Sunday, October 26, 2014

10 Newbots - A journey through popular startups

1.  Sphero
GoSphero,Founded by Ian Bernstein and Adam Wilson, passionate robotics and software engineers. They create connected toys, fusing emerging technology with the latest innovations in robotics. You will love Sphero and Ollie.

2. Zeus
AIO Robotics is a fledgling company formed by Jens Windau and Kai Chang that made a prototype of first user friendly 3D printer. They wish to make this as effective as 2D printers,scanners and fax machines. They were graduate students at University of Southern California.

3. 4moms
Mary Koes, Vice President of 4moms was a student at Carnegie Mellon University. This startup is rising to become the leader in the baby products market.

Meet the origami

and don't forget the Mamaroo


4. Rewalk

One of the essential start-ups to the mankind, Rewalk gives the disable all the support it needs. They have worked extensively on exoskeleton.

Argo founder Dr. Amit Goffer was inspired to develop the ReWalk exoskeleton unit because of his own personal story. Dr. Goffer is quadriplegic and he founded Argo in 2001. His goal was to develop a product that would enable persons with spinal cord injuries to walk again. Over the past decade, Argo has grown from a small research and development start-up based in Israel to an international company with headquarters in the US, Germany and Israel.

5. KMEL Robotics

Daniel Mellinger, Co-President and founder of KMEL Robotics was a student at UPenn. His startup on scalable aerial robotics is truely fascinating. See a demonstration below.



6. Ekso Bionics

In line with Rewalk we have a new startup for you. In healthcare, Ekso Bionics (a spin-off from UC Berkeley and 6-year old Berkeley Bionics) and their exoskeleton are beginning to penetrate rehabilitation therapy centers while a 2008 start-up.



7. ROMO

A true product based on Human Robot interaction principle. Be ready to plug and play. 2009 start-up Romotive‘s $149 Romo is selling thousands of their cute little iPhone-carrying devices



8. The Robot Dragonfly

Dr. Jayant Ratti, PhD Robotics and AI from GeorgiaTech, has formed TechJect, one of the most innovative and naturally orineted startup. Rest all lies in the video. So go ahead.



9. QBotix

Wasiq Bokhari, Founder and CEO of QBotix has coupled Robotics with Solar energy. Sounds interesting. Watch this video.




10. Liftlabs

The true innovation for the aged and the diseased. So that they have an equal chance. Have a look.




Do comment if you know about some of the innovative startups out there. Do like and share the post, for others to know about the fact, that it is ideas that make you big.


Friday, October 10, 2014

Localization for Beginners : The key to the AI World

First of all, I apologize for not blogging yesterday. I had been pretty busy with the company placements in my university. I sincerely apologize for not letting you know things.

So, after the apology program is off the memory stack. Let us get to the topic head-on. Localization is a very important concept of Artificial Intelligence. Let us begin with defining this very important term. I shall try to be very informal in my definitions( my sincere apologies to the experts). 

Localization  
Let us begin with blindfolding a robot (I shall call it Blinder). After we have safely kidnapped the robot, next step is to get into a cab and go to a very unfounded place, which the robot is not aware about. Then we remove the blindfold of the so called angry Blinder. We run away, and leave the robot at its own, to search its way out. Now, the primary task of Blinder is to see through its surrounding and find his position and orientation with respect to the surrounding. Quite an easy task, Huh?.

Well true for the humans, but very false for the robots. There are quite many reasons for that . First, it is next to impossible with the present computational resources to program the robot to make sense of all the things around it. What we see as grass, is nothing but a point in the 3D point cloud for the bot. This ability of ours to make sense of our surrounding is called Contextual knowledge in Robotics. The view of Blinder is constrained too. The most sophisticated sensing equipments, like cameras or L.R.F. (Laser Range Finders) are far less sophisticated in comparison to our simple looking EYE. Yes, the most underrepresented entity of mankind is the most sophisticated sensor in the human civilization till date. Thus various locations look quite similar to the robots and thus the probabilistic approach needs to be adopted to differentiate between them. If you are not making much sense out of this, hang On. I will be giving a detailed illustration of all of it.

Probabilistic Approach
Blinder, and all other robots, determines its present position in a probabilistic manner. It creates a map of all the possible positions a robot can be, and then assigns each location a probability. Now initially when the robot's blindfold has just been removed, and it has not grabbed any sensor reading of the surrounding, he/she is totally lost. He can be in any of the N locations possible.

P(i) = 1/N          where,  i = 1 to N

Let us for the sake of simplicity assume that N = 5. To simplify even further, let us assume that robot is lost in 1-Dimensional space. Don't loose heart with such generalization. They scale equally to the actual case of billions of equally likely points located in the 2-D space(the case with Blinder) or in 3-D space (the condition with the manipulators that are free to move in the 3-D space).

Let us make an array of 5 locations represented as boxes shown below, and place a probability of 0.2(1/N(=5)) in each one of them.

  i  = 1          i = 2         i = 3          i = 4        i = 5
0.2
0.2
0.2
0.2
0.2
This plot is also called Belief Space of the robot.

So the robot has no idea as to where he or she is. You might have noticed the color of text in each box. The color of the text is the identity of the box. So there are three blue boxes (i = 1,2,5) and two red boxes(i = 3,4). Each box's color is the only thing which the robot can identify. This is analogous to the identity of each location that the location inherits due to its disparate colors, look, feel etc. For us the robot can't see anything for the unknown locations(boxes) apart from its color. 

Now comes the hard part. To determine the robot motion model. Generally it is Gaussian in nature when the N is pretty large close to millions, which is quite a commonplace case in the Localization world. But that is very complex to express. Let us make it a bit easy, with a Gaussian like model shown below. Let us assume that the robot intends to move only one step forward at a time from one box to the next box. Also, the path is cyclic in order to ensure consistency in such a small work-space. Thus if the robot moves from i = 5 a step forward, then it reaches i = 1.



On the x axis (Tasks)

1 - the robot does not move   
2 - the robot moves the intended one step forward
3 - the robot oversteps and moves two steps instead of one step

On the y axis

1 - Probability of robot to do task 1  = P(1) = 0.2
2 - Probability of robot to do task 2  = P(2) = 0.6
3 - Probability of robot to do task 3  = P(3) = 0.2

Now if we issue a motion command, the probability distribution of the robot changes. This is also called Posterior of the robot motion.

P(i) new = [P(i )old* P(task = 1)  +  P(i - 1)old * P(task = 2)  +  P(i - 2)old * P (task = 3)]

After all the P(i) is updated. Do normalize the Probability to sum to 1.

P(i)new normalized = P(i) new / sum(P(i))



Now a quick question for all you guys?

Q.1) If the robot being at its initial stage intends to move forward, what is the new probability distribution diagram of the robot ?

A.1) At the end of this blog.

Q.2) Let us assume that the robot is initially at i = 2. What is the new posterior provided the robot intends to move 1 step forward.? Assume the motion model as shown above in the blog.

A.2)  
Initial Belief Space
 i  = 1          i = 2         i = 3          i = 4        i = 5
  0
  1
   0
0
0

                                                    Initial Probability distribution Bar plot

Posterior Belief Space
P(1) =  0 * 0.2  +  0 * 0.6  +  0 * 0.2 = 0
P(2) =  1 * 0.2  +  0 * 0.6  +  0 * 0.2 = 0.2
P(3) =  0 * 0.2  +  1 * 0.6  +  0 * 0.2 = 0.6
P(4) =  0 * 0.2  +  0 * 0.6  +  1 * 0.2 = 0.2
P(5) =  0 * 0.2  +  0 * 0.6  +  0 * 0.2 = 0

Posterior
 i  = 1          i = 2         i = 3          i = 4        i = 5
  0
  0.2
  0.6
0.2
0

                                                Posterior Probability distribution bar plot

I leave you to think, that such motion, always deteriorates the accuracy to which the position can be known. Ideally P(i = 3) should have been 1, but due to the inaccurate robot motion and thus a probabilistic motion model, the robot has P(i = 3) = 0.6

Measurement Step

Then we are left with the question as to how to improve the accuracy of the robot motion, or in other words localize the robot in its map. The question might seem tricky, but is very intuitive. We have to measure things to make a more accurate prediction. 

Remember, I marked the boxes with a color that identifies and differentiates one set of boxes from others. This is what the robot will tend to measure. Let us assume that robot has a very restrained vision and can only identify if the location(box) is red or blue.

The robot vision is not accurate either, it is bound to report wrongly. Thus let us maintain a measurement model too. In general we use two coefficients shown below.

Hit Coefficient(HC) = 0.6   
Miss Coefficient (MC) = 0.2

Note : You can choose any two values for the Hit and Miss Coefficients respectively, but make sure that 
HC > MC

Whenever a robot encounters, say a Red box, then it multiplies all the Red boxes in its belief space withe the Hit Coefficient( here = 0.6) , and all the blue boxes with the Miss Coefficient (here = 0.2).

Last but not the least, do not forget to normalize the values of probabilities in the belief space. As sum of these probabilities should always be 1, as the robot can possibly be in only one of these pre defined states. 

So let me throw up a quick question?

Q.2 If initially the robot does not know where he/she is, it moves one step with total certainty (notion model is accurate, i.e robot does not under-step or overstep), and measures Red, then it moves another step with total certainty, and measures a Blue. Please define the new belief space for the robot?

A.2) Hint: the robot motion is totally certain, thus a quick method is to move the belief space terms, cyclically one step forward to get the new motion belief space. 
Step -1 - Motion Step
Step -2 - Measurement Step (Red)
Step -3 - Motion Step
Step -4 - Measurement Step (Blue)

Answer for each of the four steps is given at the end of the blog. Do solve them first, by yourself, before jumping straight to the answer. You will get to have the essence of the Localization. Those who tend to solve this problem, will have the necessary basics to move on in the vast world of Robotics.

Note - You will also observe that Measurement model, increases the accuracy of robot presence in the belief space, while motion model decreases it.

Q. If the above statement in the note is valid, why do we do the motion update, at all?
A. Because, it is the most accurate representation of the robot model. The robot can't be trusted 100% with its motion capabilities. Ensuring a degree of inaccuracy through probabilistic robot models, helps us identify the true robot behavior.





A.1 )
i  = 1          i = 2         i = 3          i = 4        i = 5
0.2
0.2
0.2
0.2
0.2

A.2)Initial
i  = 1          i = 2         i = 3          i = 4        i = 5
0.2
0.2
0.2
0.2
0.2

Step 1 - Motion
i  = 1          i = 2         i = 3          i = 4        i = 5
0.2
0.2
0.2
0.2
0.2
Step 2 - Measurement - Red
i  = 1          i = 2         i = 3          i = 4        i = 5
0.04
0.04
0.12
0.12
0.04
After Normalization
i  = 1          i = 2         i = 3          i = 4        i = 5
1/9
1/9
1/3
1/3
1/9
Step 3 - Motion

i  = 1          i = 2         i = 3          i = 4        i = 5
1/9
1/9
1/9
1/3
1/3
Step 4 - Measurement - Blue

i  = 1          i = 2                i = 3          i = 4        i = 5
0.067
0.067
0.022
0.022
.18
After Normalization
i  = 1          i = 2                       i = 3                     i = 4             i = 5
0.1667
0.1667
0.0547
0.0547
.4478
Thus maximum is the probability of the robot being in the state of 5. which is true, as you might have observed, that the only possible way the robot could have most favorably measured Red and Blue consecutively after each motion if it would have been in Step 3 initially. Thus after 2 motions it will be in step 5.

Voila, you have aced the first step of Robotics, Localization concept must have got embedded in your mind. Best of luck for your future in Robotics.

A lot many blogs are to come, so do not forget to subscribe and like this blog.

Regards 
Harshal

P.S. Next to Come
1. Localization for Dilettante
2. Localization for Experts

keep a watch at this blog for the links to the new blogs.



Tuesday, October 7, 2014

Motor Types and the bingo choice - Obfuscating Hobbyists since Ages

Robots do numerous tasks. Centered to all these tasks is movement. Movement in robotic terms is also known as actuation. Actuation can be linear, where robot or its parts moves in straight line; or rotational, where it rotates about a fixed axis; or a mixture of rotation and translation where the robotic parts move around an axis which itself makes a translation or rotation about other axis.

By far the most popular actuators are electric motors that spin a wheel or gear, and linear actuators that control industrial robots in factories. But there are some recent advances in alternative types of actuators, powered by electricity, chemicals, or compressed air. Motors are of various types which can be categorized into three basic ones. 
  1. continuous DC motor 
  2. Stepper motor
  3. Servo motor
I will be discussing each one of them in detail. The discussion will consist of their construction, working principle and the most important of all, the big question :

"Where to use what?"

Now that I have introduced the basic types let us dwell deep into each one of them.

Continuous DC Motor

Construction and Working Principle



Ironically the miniature motors has all the parts and construction of its big brother, employed in Electrical engineering as DC Machines.
It mainly consists of an armature core with armature winding laid down in the slots made in them. These wires end up in commutator slots. The commutator is brushed through copper brushes which carry the current. The external body is static and does not move mostly(until you use an Out-runner motor, which is a special version of DC motor, having no brushes, but an electronic commutator circuit for ensuring half cycle current reversal such that the motor can produce torque). It carries field coils in the protruding structures called pole shoe. They are, like armature coil supplied by external voltage.
The current flowing through field coil produces magnetic field, which interacts with the current in the armature coil to produce torque. The alternating nature of the current in the armature coil due to commutation by split rings ensures that torque is always in the positive direction in both half cycles.

T = K(I x B)      
T = Torque produced by the motors that is coupled with the shaft and eventually makes it move
I  = The current supplied to the armature coil = V/R
V = Voltage supplied to the motor.
R = Armature resistance of the motor  (Mentioned in the motor ratings)
B = The magnetic field produced bu current in the field coil
K = constant of proportionality

Enough of the bookish stuff. Now let us quickly jump down to real knowledge which every robotics hobbyist and specialists alike must have. I would like to pose these in a question answer format.

Q. How do you control the direction of the motor? (Level - Basic)
A. It is easy. Just reverse the connections of the two wires.

Q. What to do if one wants to run the motor at half its rated speed? (Level - Basic)
A. Reduce the voltage, such that it equals to half the rated voltage.

Q. What to do if one wants to run the motor at thrice its rated speed? (Level - Basic)
A. One might be tempted to increase the voltage to thrice the rated voltage. But that is certainly wrong. If done likewise, the motor will be overburdened, get heated up and consequently melt down. It is a good and safe practice to operate the motor no more than its rated voltage or at maximum for 1.5 times its rated voltage(that too for a very short time)

Q.How is voltage related to torque in a DC motor? (Level - Basic)
A. They are proportional to each other. Increasing the voltage increases the current (= V/R) and thus increases the torque (K. I x B).

Q. I see two current ratings in my motor - Operating current and Stall current. What are they? (Level - Medium)
A. Operating CurrentThis is the average amount of current the motor is expected to draw under a typical torque. Multiply this number by the rated voltage and you will get the average power draw required to run the motor. 

Stall Current This is when you power up the motor, but you put enough torque on it to force it to stop rotating. This is the maximum amount of current the motor will ever draw, and hence the maximum amount of power too. So you must design all control circuitry capable of handling this stall current. 

Q. What is motor heat sink? Is there a heat sink for motor as well? (Level - Medium)
A. It is something every electronic circuitry requires. It is not only used for regulators, as is a common misconception, but any device which gets heated up. If one wants to operate the motor above its rated voltage, one must certainly apply heat sink to the motor.




Q. What is Power Spikes? (Level - Hard)
A. There is a special case for DC motors that change directions. To reverse the direction of the motor, you must also reverse the voltage. However the motor has a built  in inductance and momentum which resists this voltage change. So for the short period of time it takes for the motor to reverse direction, there is a large power spike. The voltage will spike double the operating voltage. The current will go to around stall current. Thus one must design the power regulation circuitry of the motor to handle such extreme cases of heating due to power, current and voltage overload.

Q. What is Operating Torque and Stall Torque? (Level - Medium)
A. Operating Torque is the torque that the motor will produce at the rated conditions of the voltage supplied. The motor generally gives high efficiency for operation around operating condition. 
Stall Torque  is the torque required externally (like a hand - if you want to hurt yourself really bad) to stop the motor from rotating.
Added fact - When struggling with the choice of which motor to choose, always go with one having high torque rating and not high velocity rating.

Q. What are other ways to reduce the velocity of the motor? (Level - Hard)
A. I think the question should be , how to reduce the velocity, while ensuring at the same time that the efficiency of the motor is the maximum. There is a general rule for DC motors.
      "Motors run the most efficient when run at the highest possible speeds. "
One can't run the motor at full speed all the time. One trick to ensure higher efficiency as well as reduced speed is to use gears.




w = the velocity of each gear
D = Diameter of each gear
N = Number of teeth of each gear

But gearing automatically reduces efficiency. Each gear reduces the efficiency by 10%. So, say you have 3 gears in a gear train(you can't attain all the speeds with just one gear, as it will lead to huge diameter of gears and thus hurt miniature motors. Instead we use two to three gears in cascade to achieve the equivalent effect.). Then the total efficiency of the motor, now, is

Motor efficiency after three gears = (0.9)x(0.9)x(0.9)x Motor efficiency of original motor

Q. How to control the DC motors?
A. You need to know three aspects of controlling a DC motor:
     1. Encoders
     2. H- Bridge
     3. DC Motor braking mechanism

These three are topics by themselves. I will be providing detailed explanations to them in next set of blogs. So stay tuned.
Feel free to Google them for the time being. 


Stepper Motors

Construction and Working



A stepper motor is a type of DC motor which has a full rotation divided in an equal number of steps. It is a type of actuator highly compatible with numerical control means, as it is essentially an electro-mechanical converter of digital impulses into proportional movement of its shaft, providing precise speed, position and direction control in an open-loop fashion, without requiring encoders, end-of-line switches or other types of sensors as conventional electric motors require.

Working

DC brushed motors rotate continuously when voltage is applied to their terminals. The stepper motor is known by its important property to convert a train of input pulses (typically square wave pulses) into a precisely defined increment in the shaft position. Each pulse moves the shaft through a fixed angle. Stepper motors effectively have multiple "toothed" electromagnets arranged around a central gear-shaped piece of iron. The electromagnets are energized by an external control circuit, such as a micro-controller. To make the motor shaft turn, first, one electromagnet is given power, which magnetically attracts the gear's teeth. When the gear's teeth are aligned to the first electromagnet, they are slightly offset from the next electromagnet. This means that when the next electromagnet is turned on and the first is turned off, the gear rotates slightly to align with the next one. From there the process is repeated. Each of those rotations is called a "step", with an integer number of steps making a full rotation. In that way, the motor can be turned by a precise angle.

Now, since we have the basics of Stepper motor in our bag, lets quickly move through the question answer session. The session consists of the most common questions one asks for when trying to work with stepper motors.

Q. What are the three wires for in the stepper motor? What does each of the color of the wire mean? (Level - Medium)
A. This is one of the most common problems a hobbyist encounters. Let me explain you, that the colors of the wires have a meaning and follow a color code.
The number of wires in a stepper motors can be 4,6 or 8. The respective circuit diagram of a stepper motor is:



The color code can be found at this site: http://www.linengineering.com/resources/wiring_connections.aspx

Q. What is the relation between number of steps performed by stepper motor and number of control impulses? (Level - Basic)
A. When functioning correctly the number of steps performed must be equal to the control impulses applied to the phases of the motor.

Q. Does stepper motor employ closed loop or open loop control system? (Level - Basic)
A. To understand this question, one must know, first, that what is difference between open loop and closed loop control system.
Open-loop control system employs no feedback mechanism, that is at no stage, final or intermediate output is fed back as input to the system. Stepper motor is perfect example of open loop control system as its output only depends on the train of pulses which are provided as input, at no stage the output position, velocity or acceleration are fed into the system.
Closed-loop control systems are those systems that employ such feedback mechanism. For instance a DC motor using encoders for position or velocity feedback to control the position or velocity is an example of closed loop control system.

Q. Does a stepper motor fall back i.e lose steps i.e does not move for one or more pulses? (Level - Basic)
A.  A stepper motor does not lose steps, i.e. no slippage occurs, it remains synchronous to control impulses even from standstill or when braked, thanks to this characteristic a stepper motor can be started, stopped or reversed in a sudden fashion without losing steps throughout its operation.

Q. Where should one use stepper motors ans what are its limitations? (Level - Basic)
A.  The power range of a stepper motor varies from few micro-watts (uW) to no more than few kilowatts(kW). Thus they are used for low to medium power applications.
They are used mostly where high speed precision movements are required, than at places of heavy duty applications where torque is the point of concern.
Areas of applications - Plotters, Disc drivers, Robotic arm, Printers, CNC machines.

Q. You told us a lot of advantages. So is it all dream come true motor? (Level - Medium)
A. No! I think i got 80% optimistic and just 20% realistic
The stepper motor has its own set of disadvantages :-
     1.  Low torque capacity
     2.  Low power efficiency
     3.  Fixed step value for a given motor.

Q. What is unipolar and bipolar motors? What type is Stepper motors?
A. Unipolar motors : When the direction of the current supplied to the motor is not changed to change the direction of the motor. Then it is a Unipolar motor.
Bipolar motors: When the direction of the current must be changed to ensure a reversal in the direction of current, it is called bipolar motor. Eg. - Continuous DC motors

Stepper motors can be either of the two types depending on the types of stepper motor. Please follow the next question to find out the exact answer.


Q. What are the types of Stepper motors? (Level - Hard)
A. There are three types of stepper motors:
  1. Variable Reluctance type - Reactive type
  2. Permanent magnet type - Active type
  3. Hybrid - Mixture of (1) and (2)
Variable Reluctance type

Courtesy: WikiForU.com

The rotor has teeth as shown in the figure. It is passive in nature as the control winding (the coils), are not on the rotor, but on the stator. By energizing one or more phases, the rotor will turn in such a manner that it settles on a minimum reluctance path.

There are two such paths:-

  1. When the rotor teeth align with the stator teeth (also called stator pole).
  2. When the rotor teeth align with the bisector of the stator pole.
Pros:

  1. Helps in achieving small to medium step angles
  2. Feasible to operate at high control frequencies.
Cons:

  1. It can't hold its position i.e when no current flows through the stator winding, there is no stopping torque.
It is an example of Unipolar motor.The change in the direction of the motor is achieved through change in the impulse sequence.


Permanent Magnet Type

Courtesy: WikiForU.com
Stay tuned for the explanation. 

Hybrid Type 

Courtesy: WikiForU.com
Stay tuned for the explanation.


Q. Can you please help me with Stepper motor jargon? (Level - Medium)
A. Sure! why not. Here are few most important ones, one should be aware about.

  1. Step Angle - It is the angle turned by the motor for one input impulse.
  2. Pull-in torque - Represents the maximum torque load at the shaft, for which the motor can start without losing steps.
  3. Pull-out torque - Maximum torque that the motor can maintain at a particular speed, without losing steps
  4. Detent torque - It is the holding torque that the motor torque offers when it is not energized. 
  5. Angular speed - Angular speed = (Stepping Angle) x (Control Frequency)
  6. Maximum Frequency - It is the maximum frequency at which a motor can remain synchronized with the input train of pulses. 


Q. How to control a stepper motor? (Level - Hard)
A. This is a topic in itself. I will be posting the link to this question in a separate blog. So stay tuned for the link to that blog under this question at a later stage. But for tha sake of introduction,
There are actually 4 types of control system for the stepper motor:

  1. Half step drive
  2. Full step drive
  3. Wave drive
  4. Micro-stepping drive
Q. What is Ringing and Resonance in Stepper motor? (Level - Medium)
A. When the motor moves a single step it overshoots the final resting point and oscillates round this point as it comes to rest. This undesirable ringing is experienced as motor vibration and is more pronounced in unloaded motors. An unloaded or under loaded motor may, and often will, stall if the vibration experienced is enough to cause loss of synchronisation.
Stepper motors have a natural frequency of operation. When the excitation frequency matches this resonance the ringing is more pronounced, steps may be missed, and stalling is more likely. Motor resonance frequency can be calculated from the formula:

Mh   = Holding torque cN·m
p      = Number of pole pairs
Jr     = Rotor inertia kg·cm²


Servo Motor

Construction and Working Principle

This is nothing but a simple electric motor, controlled with the help of servomechanism. If the motor as controlled device, associated with servomechanism is DC servo, then it is commonly known DC Servo Motor. If the controlled motor is operated by AC, it is called AC Servo Motor.


The working principle is same as the DC motor (as visible in the break apart motor shown above), but with an added velocity or position feedback achieved using a potentiometer.

Control Mechanism

The entire control mechanism can be very easily understood using the figure cum circuit illustration shown below.

ServoMechanism
The position of the output, measured by the potentiometer, is continually compared to the commanded position from the control (i.e., the radio control). Any difference gives rise to an error signal in the appropriate direction, which drives the electric motor either forwards or backwards, and moving the output shaft to the commanded position. When the servo reaches this position, the error signal reduces and then becomes zero, at which point the servo stops moving.
If the servo position changes from that commanded, whether this is because the command changes, or because the servo is mechanically pushed from its set position, the error signal will re-appear and cause the motor to restore the servo output shaft to the position needed.

Now let us come down to few typical questions that comes in mind of a robotics aspirant.

Q. How many wires are used and is there a color code for the wires? (Level - Basic)
A. Yes, there are three wires in a servo motor.

  •  Black or Brown - Ground
  •  Red - Live
  •  Yellow or White - Control Signal wire 

Q. What are the types of Servomotors? (Level - Basic)
A. There are basically three types of servomotors.
  • Positional rotation servo: This is the most common type of servo motor. The output shaft rotates in about half of a circle, or 180 degrees. It has physical stops placed in the gear mechanism to prevent turning beyond these limits to protect the rotational sensor. These common servos are found in radio-controlled cars and water- and aircraft, toys, robots, and many other applications.
  • Continuous rotation servo: This is quite similar to the common positional rotation servo motor, except it can turn in either direction indefinitely. The control signal, rather than setting the static position of the servo, is interpreted as the direction and speed of rotation. The range of possible commands causes the servo to rotate clockwise or counterclockwise as desired, at varying speed, depending on the command signal. You might use a servo of this type on a radar dish if you mounted one on a robot. Or you could use one as a drive motor on a mobile robot. In such servos the input pulse results in a rotational speed, and the typical 1.5 ms center value is the stop position. A smaller value should turn the servo clockwise and a higher one anticlockwise.
  • Linear servo: This is also like the positional rotation servo motor described above, but with additional gears (usually a rack and pinion mechanism) to change the output from circular to back-and-forth. These servos are not easy to find, but you can sometimes find them at hobby stores where they are used as actuators in larger model airplanes.

Q. What is PWM and how is it used to run the servomotor? (Level - Hard)
A. PWM stands for Pulse Width Modulation. It is a control signal that is fed into the control wire of the servo motor. 
In general a PWM signal and its corresponding servo position looks like this:

Each servo's requirements vary slightly, but a pulse train (as in Figure above) of about 50 to 60 Hz works well for most models. The pulse width will vary from approximately 1 millisecond to 2 or 3 milliseconds (one millisecond is 1/1000 of a second). 

NOTE :

  1. I will be updating this blog in near future to make it more complete. So kindly stay tuned with this page.
  2. This is a very introductory blog for beginners to come at scale with the experts. The level of difficulty will keep on increasing
  3. I will be posting blogs related to 
  • Under-actuated Robotics
  • Computer Vision
  • Artificial Intelligence
  • Machine Learning
  • Mobile Robotics
I will try to post one blog a day, so you can expect a lot of in depth information related to robotics at a place. 

Do like and comment, Your suggestions for topics to cover are most welcomed.