Introduction: Tutorial:DC Motors-2/3: Servo, Brushless and Coreless, Vibration

This is a continuation of the tutorial started in DC Motors Tutorial-1/3: Continuous, H-Bridge, Gear. With about 88,000 views, many Instructables.com readers found that tutorial of interest. Hopefully, if you were one of the viewers of Part 1, or a new reader, you will find this second Part of the tutorial also interesting and helpful.

The first video is that of a Brush Robot that is powered by a vibration motor. Vibration (or vibrating) motors are discussed in more detail later in this Part of the tutorial.

As noted in the introduction to Part 1 of this tutorial, DC motors are ubiquitous. They convert electrical/magnetic energy, produced by a wire carrying current in a magnetic field, to motion, and they appear in all sorts of appliances and applications, e.g., they are found in small fans, ceiling fans, air cleaners, solder fume extractors, quadcopters, small helicopters, and other drones, hand-held rotary tools, circular saws, drills, lathes, sanders, cars, robots (where they rotate tires, or move robotic arms, etc.), aquarium air pumps, Maker projects, and many other areas. This tutorial only discusses DC motors. The categorization of motors found here is not mutually exclusive, as there is overlap between what may initially seem like entirely different motors. Usually, this is due to the target function of these motors rather than the theory behind the

This Part, i.e., Part 2, of the tutorial discusses DC Servo Motors, Brushless Motors and Coreless Motors, and Vibration Motors.

A discussion and elaboration of Stepper Motors is presented in Part 3.

Step 1: DC Servo Motors

Servo motors used by hobbyists are usually relatively small (see photographs), and generally use only the amount of current needed to move to a specific location or provide the needed torque, i.e., the turning force required by the application. Thus, they tend to be energy conservative. They are typically brushless, with from 4 to 12 poles. Servos always have some type of feedback component, i.e., they use a closed loop system to control position. They usually have a fairly constant torque throughout their range. In general, the higher the acceptable voltage, the higher the torque, and the greater the speed of the servo. They are used in a variety of applications, e.g., robotics, tools, auto focusing cameras, automatic door opening, solar tracking, antenna orientation, home automation, etc. Put simply, they make our lives easier.

The major components of a servo are usually contained inside its housing and generally include a motor, potentiometer, electronic circuitry, and a gear train. The important elements of all servo motors are their closed loops which get feedback from an encoder (also known as a shaft encoder or rotary encoder, that generally produces digital output) or a resolver (for measuring angular rotation, an analog component). Encoders can be categorized as incremental (or quadrature) or absolute, where each location has it own digital code. Servos with absolute encoders may be preferred owing to their greater accuracy compared to servos with incremental encoders.

Servo motors can be brushed or brushless. Although brushless motors tend to be more costly and complex, since their commutation is done electronically rather than mechanically, they require less maintenance as they eliminate the need, and cost, to repair "brushes".

The internal motor of a servo spins rapidly, and actually is limited in torque, but the reduction gear train changes that rapid rotation to a slower value. This allows the servo to move at a slower speed but with higher torque. The motor spins the fastest with no load, as can be seen in the attached illustration of a motor torque-speed curve above. The symbol for this no load speed is frequently shown as the lowercase Greek omega followed by an ‘n’ subscript. In general, the higher the voltage the greater the speed of a motor.

As already noted, there is a tradeoff between speed and torque. The curve (straight line graph) shown here is only for illustration, as an actual torque-speed curve depends on the type of motor, and the changes in electrical input. However, torque-speed curves generally can be approximated by a linear function, as can torque and current. Power for a motor is defined as torque multiplied by angular velocity. We can see that the maximum power from a motor occurs at the point on the curve (here a line), where the area of a rectangle drawn to a point on the line from both axes is greatest. This can be calculated directly by constructing rectangles from points on the line to the two axes. Then the areas of each of these rectangles will be torque x speed, i.e., motor power. So, the rectangle with the greatest area will identify the point at which a motor has its greatest power.

This point should not be confused with the efficiency of a servo motor. Efficiency is the division of the power obtained from the motor compared to the power put into the motor. It is often represented by the lowercase Greek letter eta, η. This value is always less than one. Motor efficiency typically ranges from 50% to 90%. However, high inefficiency should be avoided as it is not only responsible for power loss, but can result in heat generation. Too much heat can have a deleterious effect on a motor.

Servo motors tend to cost a bit more than the other motors discussed here. They typically have a range of motion from 90-180 degrees. Some hobby and robotics servos are not capable of turning beyond 180 degrees. This is often due to a mechanical stop built into one component of the servo’s gear train. However, some servos are continuous. They can rotate completely, i.e., a full 360 degrees. (One of the attached photographs shows a continuous servo of this type, weighing only 38 gm that runs from 4.8-6v.)

The external component that connects to the servo's “shaft” is called its horn, which is typically a circle, a single arm, a simple cross (four arms), or a component with six equally spaced arms.

The servo turns, typically using an internal pulse width modulator to send PWM signals to its motor, to the position desired. The stalling torque of a servo is, as the name implies, the amount of torque that must be applied against the direction of servo movement to cause the servo to stall, i.e., for the motor's speed to become zero. This is often represented in motor datasheets by the lowercase Greek letter tau sub-zero or tau sub-s.

As noted previously, torque is equal to the length times the force. It only takes half the stalling torque to stall a servo motor using an extension from the servo's shaft that is twice the length/distance from the shaft. That is, the nearer we are to the center of the servo motor's shaft the greater the torque required to produce stalling. Servos are often used in applications requiring fast acceleration and deceleration, and these capabilities result in them frequently being found in industrial automation equipment, and in some of the areas previously mentioned.

The first two pictures show the gear train inside one of the popular hobby servo motors used with Arduino, the SG90. This is an inexpensive motor; it contains a plastic gear train, as can be seen, and so is not as durable as, e.g., the MG995 (see photographs), a servo containing metal gears. However, owing to the presence of heavier gears in the MG995 some users have experienced problems with startup speed and accuracy. Fortunately there is now a later/upgraded version of this servo, the MG996R (see photographs), which contains improved electronics and gearing. Although it is slightly heavier, it seems to be more accurate with relatively high torque, and is only very slightly more costly.

If a hobby servo with a plastic gear train is stalled, this can result in some gears in the gear train getting damaged, i.e., becoming stripped. Gears on inexpensive servos are often made of plastic or nylon, etc. More expensive servos, such as those mentioned above, often contain gears made of various metals including titanium (to produce a lower weight, while still maintaining strength). There is a "hardened" version of the SG90, the MG90S, which contains metal gears (MGs), but its price is about 9 times higher than the plastic-geared SG90.

Less expensive servos usually have the rotor turn inside of a bushing rather than a ball bearing mount. For more expensive servos the opposite is usually true. There are, in fact, dual ball bearing servos to provide even more longevity (see e.g., the attached photograph of the DES 677 BB, a dual ball bearing servo). For important projects, based on prior experience, I always use the longest lasting motors I can, i.e., ones with ball bearings.

However, an Instructables reader, GuidoSan, was kind enough to leave a comment for Part 1 of this tutorial, noting that "bushings hold up surprisingly well as long as you don't have side thrust ... but don't hesitate to use bushed motors when you don't have side thrust. "

The inside mechanical components of a servo can wear. So, if a servo starts to become "jittery", it is probably time to replace it. There are analog and digital servos. A digital servo can generally operate at faster speeds, and can respond more quickly than an analog servo. A digital servo is also smoother and is typically more accurate. (See attached photographs for pictures of digital servos). However, digital servos are more expensive and can take more current than analog servos, but may be the servos of choice if current needs are met and you can afford them. Some servos are coreless, and these servos would typically be lighter and more responsive. Some examples of these types of servos can be seen in the attached photographs. Coreless motors are discussed later in this Part.

The basic operating principle for a DC servo motor is similar to that of other DC motors. Like other motors they can be wired in a series or parallel configuration, or have permanent magnets. Modern technology has helped strengthen permanent magnet motors. Specifically, the development of Neodymium and other rare earth magnets has led to increases in magnetic strength, possibly on the order of 300% for N52 neodymium magnets. (As an aside, for motors to be operated in very high temperatures, N42 high temperature Neodymium magnets may be a better choice).

Today servos are often found specified with values such as 9 grams, e.g., the common Tower Pro SG90. This specification is the weight of the servo, and does not including the weight of the wires to/from the motor. That is, the value in grams is usually the servo's weight not its torque. One should expect metal gear servos to be constructed more sturdily and to weigh more than their plastic gear cohorts, and that is the case; e.g., the MG995 weighs approximately 48 grams, as can be seen in the attached photographs.

Servos are also available that are linear instead of rotary. These linear "actuators" often contain a worm gear to change their rotary motion to linear motion.

Step 2: Arduino Project -1 Using a Servo Motor

In this project both a 5K potentiometer and SG90 servo motor are connected to an Arduino UNO microcontroller board. The two end wires from the potentiometer are connected to the +5 volts and ground sockets available on the Arduino UNO. Reading the ‘wiper’ output of the potentiometer, while its knob is being changed, produces output voltages ranging from approximately zero to 5v. In the sketch the output of the potentiometer’s 'wiper’ is read, using an analogRead() function. The value that is read, which is between zero and five volts, is then converted to one of 1,024 discrete values by one of the analog-to-digital convertors (ADCs) available on any of the Arduino UNO’s analog pins. The servo motor is positioned using the ‘write()’ function, which is contained in the code for the servo object. The servo is moved between zero and 180 degrees, depending on the value read from the potentiometer’s ‘wiper’, and converted using the ADC converted value and the ‘conversionFactor’ calculated in the sketch.

Step 3: Sketch for Arduino Project-1 Using a Servo Motor

In this sketch a 5k pot controls the position of the SG90 servo motor. First a servo object is created and then assigned to digital pin nine. The potentiometer is assigned to analog pin four, as we want to use one of the ADCs available on the analog pins. The pot is read and the servo positioned according to that reading.

To see the sketch exactly as written please download the text file.

----------Sketch----------

// Potentiometer controls servo position

#include Servo.h // Be sure to include Servo.h inside less than and greater than brackets
// This site removes the brackets and any text in between them

Servo servo1;

// create a servo1 servo object

const int potPin = A4;

const int servoPin = 9;

int position = 0; // Store a value in position

int delay1 = 300;

//The Arduino 10-bit ADCs map 0v to 5v between 0 and 1023 inclusive

const float conversionFactor = 180.0/1023.0; // Servo moves between 0 & 180 degrees

void setup() {

servo1.attach(servoPin); // Attach the servo object to the servo Pin }

void loop() {

// Read the potentiometer pin and adjust the postion of the servo

// in consonance with that reading

position = analogRead(potPin)*conversionFactor;

servo1.write(position);

delay(delay1);

}

Step 4: Arduino Project -2 Using the MG995 Metal Gear Servo Motor

In this project, the MG995, metal gear dual ball bearing servo, is connected to an Arduino, with the brown lead from the servo going to one of the Arduino UNO's GND pins, the red lead from the servo going to the 5v pin on the Arduino (this servo will operate with from 4.8-7.2v), and the orange lead from the servo going to digital pin 8 on the Arduino. Five (5) different colored LEDs, i.e., Red, Yellow, Green, Blue, and White LEDs are connected to an Arduino. Specifically, their negative sides are connected to one of the GND pins on the UNO, and their positive leads (the longer ones) are each connected through a 470 ohm to digital pins 9, 10, 11, 12, and 13 of the Arduino. The LEDs light up at approximately the 0-40-80-120-160 degree positions of the servo as it rotates. The servo then rotates in the opposite direction, again lighting the LEDs at the angular positions specified above.

The servo pauses briefly, 500ms, before beginning another rotation through 160 degrees.

Step 5: Sketch for Arduino Project-2 Using MG995 Metal Gear Servo Motor

The sketch below is for a project which uses the MG995 metal gear servo. This motor is slightly less expensive than its replacement the MG996R. Some users have had issues with the MG995 servo, although I am fortunate in not having had any myself.

I plan to continue using my MG995 servos until my inventory of this model is used up. After that I will use MG996R servos. If you do not yet have either model of servo, my recommendation would be that you go with the MG996R rather than the servo I used. Both are metal gear servos, but the MG996R is an update of the MG995, and so would appear the better choice.

To see the sketch for Project-2 exactly as written, including the spaces as entered, please download the text file.

----------Sketch----------

// Written by R. Jordan Kreindler, September 2016

// Servo moves to 0-40-80-120-160 degree positions and

// different colored LEDs light when servo at these positions

#include Servo.h // Please enclose Servo.h inside less than and greater than symbols

// This site removes these symbols and any text in between

Servo servo1; // create a servo1 servo object

const int servoPin = 8; // Pin assignment for servo data

const int redPin = 9; // Pin assignment for red LED

const int yellowPin = 10; // Pin assignment for yellow LED

const int greenPin = 11; // Pin assignment for green LED

const int bluePin = 12; // Pin assignment for blue LED

const int whitePin = 13; // Pin assignment for white LED

int position = 0; // Store a value in position

int delay1 = 500; // Delay before starting sweep

int delay2 = 1000; // Delay before moving to next position

void setup() {

servo1.attach(servoPin); // Attach the servo object to the servo Pin

pinMode(redPin, OUTPUT); // Set red LED pin to receive output from Arduino

pinMode(yellowPin, OUTPUT); // Set yellow LED pin to receive output from Arduino

pinMode(greenPin, OUTPUT); // Set green LED pin to receive output from Arduino

pinMode(bluePin, OUTPUT); // Set blue LED pin to receive output from Arduino

pinMode(whitePin, OUTPUT); // Set white LED pin to receive output from Arduino

}

void loop() {

// Move the servo to 40-80-120-160 degree positions

// Pause at these positions for delay2/1000 seconds

// Yellow at 40-degrees, Green at 80-degrees, Blue at 120-degrees

delay(delay1); // Delay before starting sweep

for (position = 0; position <= 160; position = position+40) {

servo1.write(position);

if (position == 40) {

digitalWrite(yellowPin, HIGH);

delay(delay2);

digitalWrite(yellowPin, LOW);

}

if (position == 80) {

digitalWrite(greenPin, HIGH);

delay(delay2);

digitalWrite(greenPin, LOW);

}

if (position == 120) {

digitalWrite(bluePin, HIGH);

delay(delay2);

digitalWrite(bluePin, LOW);

}

if (position == 160) {

digitalWrite(whitePin, HIGH);

delay(delay2);

digitalWrite(whitePin, LOW);

}

}

// Reverse Servo Direction 120-80-40-0 degree positions

// Pause at these positions for delay2/1000 seconds

// Light the appropriate LED at 0-degrees Red, at 40-degrees Yellow,

// at 80 degrees Green

delay(delay1); // Delay before starting sweep

for (position = 120; position >=0; position = position-40) {

servo1.write(position);

if (position == 0) {

digitalWrite(redPin, HIGH);

delay(delay2);

digitalWrite(redPin, LOW);

}

if (position == 40) {

digitalWrite(yellowPin, HIGH);

delay(delay2);

digitalWrite(yellowPin, LOW);

}

if (position == 80) {

digitalWrite(greenPin, HIGH);

delay(delay2);

digitalWrite(greenPin, LOW);

}

if (position == 120) {

digitalWrite(bluePin, HIGH);

delay(delay2);

digitalWrite(bluePin, LOW);

}

}

}

Step 6: Brushless and Coreless Motors

In 1962 T.G. Wilson, P.H. Trickey published the paper D.C. Machine With Solid State Commutation in Volume: 81, Issue: 11, pages 879-884 of Electrical Engineering, a publication of the American Institute of Electrical Engineers (AIEE). In this paper the authors discuss an experimental DC motor that was able to perform commutation without the need for a physical commutator.

This concept combined with the advances in permanent magnet materials in the 1970s and 1980s lead to practical implementations of brushless DC (BLDC) motors. Brushless motors do away with the problem of brush wear and sparking and are therefore often used for their long lives and safety in potentially hazardous environments. They can be found in robots and human controlled machinery (the Segway uses brushless motors), quadcopters and other model aircraft, computer fans, DVD players, ceiling fans, cordless power tools, industrial applications, and in the recent past direct-drive record players, etc. Brushless motors come in a variety of shapes, sizes, and voltages. (See photographs for two brushless fan motors of differing size that use 5 volts and 12 volts respectively.)

Brushless motors can also be used in servos, where they provide greater stability. However, brushless motors are more expensive than their bushed counterparts, so unless these motors are needed for their long lives or safety features (i.e., without the sparking that may occur with brushed motors), brushed motors may be the right choice.

Until the introduction of strong permanent magnets in the 1970s and 80s, brushless motors were restricted in the torque that they could deliver. However with the introduction of, e.g., neodymium (NeFeB) magnets (developed in 1982), perhaps the strongest and most often used of the rare-earth magnets, and transistors that could handle high voltages, the situation changed. Brushless DC motors are today able to deliver as much torque as brushed motors, and since the commutation function is done electronically, these motors do not need brushes. They have less parts, and a longer live expectancy (today exceeding 10K hours, or well over a year of continuous use), compared to the typical life expectancy of 2K to 5k hours (approximately 83 to 208 days of continuous use) for a brushed motor. That is, BLDC motors have approximately 2-5 times the life expectancy of a brushed motor.

Brushless and stepper motors are essentially the same. The primary difference is how they are used. While a stepper motor is expected to move to a particular angular position, a BLDC motor is usually run to provide a continuous rotary motion. Also a BLDC motor usually has fewer steps than a stepper. For example, some BLDCs have only four steps per revolution, while steppers usually have 100s, as precise positioning is important.

Brushless motors can be divided into two categories: outrunner and inrunner motors. Outrunner motors (i.e., motors where the outside case spins around its coils), are popular in model aircraft and electric bikes, where their lower weight and high torque often make them the motors of choice. (See attached video for an example of an outrunner motor where the outside case spins as the shaft is turned.) The outrunner motor shown would probably be attached at the bottom, as that part of the motor does not turn with the case and rotor. One of the included pictures shows the components typically provided with an outrunner motor to be used in model aircraft. Outrunner motors rotate at a slower speed than inrunner motors, and depending on your application, this can be an advantage or disadvantage.

For an example of an outrunner motor, the video mentioned above is illustrative, but to see a still photograph of this type of motor, look at the motor labeled 1000KV. That motor, used in various hobby aircraft, is a brushless outrunner motor. You should have already seen the video where the shaft of this motor is turned and the case turns in consonance. It is easy to see the coils of this outrunner from either the top, as shown here, or the bottom of the motor.

Sometimes, particularly for quadcopters and other drones, one sees the abbreviation KV on brushless motors. This does not mean kilovolts, but rather RPM per volt. For example, a 2,000 KV motor would turn at 2,000 RPM with one volt and 4,000 RPM with two volts, and so on. This value is for the motor running without a load.

Although there are as yet no US or international standards for identification, BLDC outrunner motors often have numerical markings that can be interpreted. Returning to the outrunner motor mentioned above, it has the markings A2212/13T and on a separate line following these markings, it has the characters 1000KV. The second line was already discussed above where the meaning of KV on a motor was explained.

So, let us concentrate here on the other markings. The first number 22 usually represents either the diameter of the rotor or motor itself, as there are no standards yet, this number could also represent the weight of the rotor or motor. That is, it is likely the rotor or motor diameter or weight. The number 12, i.e., the next two numbers following the number 22, is usually the height of the rotor or case. The number following the ‘/’ is the number of turns for each coil. These coils will each produce a pole in the motor. The more the number of turns, the stronger the magnetic field, and thus the more the torque, and the slower the motor. However, as there are as yet no standards, the numbers although they can usually be interpreted as explained here may not be as expected.

Some brushless motors are also coreless (or ironless). However, coreless motors can be brushed or brushless. The defining feature of coreless motors is that they contain no iron core in the rotor. Their rotor is made up only of wire windings. Often the rotor is simply a cylinder made up of these windings (see attached photograph), or bonding material holding magnet wire together. Without an iron core, the mass of the rotor is considerably less, this is particularly true if the windings are made of aluminum rather than copper wire, as copper has a greater mass.

Windings made of aluminum may reduce the mass by a factor of two. Because of their reduced mass, the rotor in coreless motors can accelerate considerably more rapidly, as they have quite low inertia. Typical cored motors can have an angular acceleration of from 30-50k radians per second per second. For coreless motors this angular acceleration can be as high as 1 million radians per second per second, or perhaps higher. These angular acceleration values are the speeds at which angular velocity can change.

The primary problem with coreless motors is that the absence of an iron core means these motors lack a integral "heat sink", and they often must be cooled by some additional means to prevent overheating. Coreless motors were first developed to help bring reel-to-reel tapes quickly up to operating speed in early computers, although that capability is not needed for the random access storage devices used today. Coreless motors can be divided into two shape categories: cylindrical or disc.

Motors of the types mentioned here are often found in servos, aerial drones, etc.

Step 7: Vibration (Vibrating) Motors

A vibration (or vibrating) motor, sometimes an Eccentric Rotating Mass (ERM) motor, of the types discussed here, is used to provide an almost inaudible and tactile indication of some activity, e.g., that a phone call, email, or message has arrived, or in Maker projects to animate robots (see last photograph), etc.

Vibration motors usually operate from 1.5-6v, 3v is often their nominal voltage, and they can vibrate significantly when they receive a voltage in their acceptable voltage range. A vibration motor’s vibration frequency (i.e., the motor’s speed) and strength is directly related to the applied voltage. We can use PWM to set what this equivalent input voltage will be. One finds vibration motors, e.g., in cell phones (see attached video, but be sure and turn up your audio to hear the almost inaudible vibration) and other mobile devices, and also in many devices providing haptic feedback. The third visual (second picture not counting the video), as well as the third and fourth still photographs are of very small vibration motors. Vibration motors, in these small sizes, are often used in cell phones and other mobile devices.

The theory behind a vibration motor is quite simple. An asymmetrical weight is affixed to the shaft so that the motor is not balanced when its rotor rotates, this produces the vibration and vibrating sound. If the asymmetry is significant the vibration will be stronger, as it will be if the motor is larger.

Vibration motors also come in coin (also called pancake) styles, as well as cylinder styles. In this format they have no visible shaft (and are sometimes called shaftless). However, they do have a shaft, but it is inside the "pancake" structure and not visible. They, like their cylindrical cohorts, have an unbalanced weight. Their compact size, usually less than 12mm in diameter finds them useful in devices, e.g., cell phones, that are relatively small in size. (See attached photographs.) A potential issue is that in certain positions and with certain voltages, these coin vibration motors may not work as desired. Specifically, in particular orientations the coin motor's eccentric mass may not be able to move, as hoped, e.g., if it is perpendicular to the pull of gravity, i.e., vertical. These motors are quite inexpensive.

Almost, any motor can be changed into a vibration motor if the load on the shaft is sufficiently asymmetrical. See the last attached video, where a twisted wire is attached to one side of the shaft of a continuous DC motor. Compare the rotation of this motor to the rotation of the same motor in Part 1 of this tutorial, where a symmetrical propeller was used instead of a wire. The motor with the propeller will be seen to rotate almost noiselessly while the one here, with the asymmetrical wire, will be seen to vibrate significantly.

The last picture is of the vibration motor included in the Brush Robot kit, a video of which was provided in the Introduction to this Part of the tutorial.

Step 8: Afterwards

If you have come to this point congratulations. You should now have a basic understanding of some of the key elements of the DC motors covered in Part 2 of this tutorial. I hope you found this Part of the Instructable of value. If so, please let me know in the comments section.

If you liked this Part of the tutorial you may want to see Part 1 at, https://www.instructables.com/id/DC-Motors-Part-1-C....

It may be obvious, but if it's not, this tutorial, even though it is in three parts, just "scratches the surface" of DC motors. In fact, each of the motors covered here could have its own multi-part tutorial, or perhaps an entire textbook.

If you have any comments or suggestions related to this Part of the tutorial, please add your comments below, to those already received.

If you have any thoughts or questions, related to DC motors, but not covered in this tutorial, or any suggestions for how I could improve this or the other Parts of the tutorial, I would be pleased to hear from you. You can contact me at transiintbox@gmail.com. (Please replace the second 'i' with an 'e' to contact me. Thank you.)

Step 9: