Finger Print Lock
Finger Print Lock
Finger Print Lock
An Arduino is actually a microcontroller based kit which can be either used directly by
purchasing from the vendor or can be made at home using the components, owing to its open
source hardware feature. It is basically used in communications and in controlling or
operating many devices. It was founded by Massimo Banzi and David Cuartielles in 2005.
Arduino Architecture:
Arduino’s processor basically uses the Harvard architecture where the program code and
program data have separate memory. It consists of two memories- Program memory and the
data memory.The code is stored in the flash program memory, whereas the data is stored in
the data memory. The Atmega328 has 32 KB of flash memory for storing code (of which 0.5
KB is used for the bootloader), 2 KB of SRAM and 1 KB of EEPROM and operates with a
clock speed of 16MHz.
Arduino Architecture
Arduino Uno consists of 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an
ICSP header, and a reset button
Power Jack: Arduino can be power either from the pc through a USB or through external
source like adaptor or a battery. It can operate on a external supply of 7 to 12V. Power can be
applied externally through the pin Vin or by giving voltage reference through the IORef pin.
Digital Inputs: It consists of 14 digital inputs/output pins, each of which provide or take up
40mA current. Some of them have special functions like pins 0 and 1, which act as Rx and Tx
respectively , for serial communication, pins 2 and 3-which are external interrupts, pins
3,5,6,9,11 which provides pwm output and pin 13 where LED is connected.
Analog inputs: It has 6 analog input/output pins, each providing a resolution of 10 bits.
The most important advantage with Arduino is the programs can be directly loaded to the
device without requiring any hardware programmer to burn the program. This is done
because of the presence of the 0.5KB of Bootloader which allows the program to be burned
into the circuit. All we have to do is to download the Arduino software and writing the code.
The Arduino tool window consists of the toolbar with the buttons like verify, upload, new,
open, save, serial monitor. It also consists of a text editor to write the code, a message area
which displays the feedback like showing the errors, the text console which displays the
output and a series of menus like the File, Edit, Tools menu.
Programs written in Arduino are known as sketches. A basic sketch consists of 3 parts
1. Declaration of Variables
2. Initialization: It is written in the setup () function.
3. Control code: It is written in the loop () function.
The sketch is saved with .ino extension. Any operations like verifying, opening a
sketch, saving a sketch can be done using the buttons on the toolbar or using the tool
menu.
The sketch should be stored in the sketchbook directory.
Chose the proper board from the tools menu and the serial port numbers.
Click on the upload button or chose upload from the tools menu. Thus the code is
uploaded by the bootloader onto the microcontroller.
We can also design our own Arduino by following the schematic given by the Arduino
vendor and also available at the websites. All we need are the following components- A
breadboard, a led, a power jack, a IC socket, a microcontroller, few resistors, 2 regulators, 2
capacitors.
The IC socket and the power jack are mounted on the board.
Add the 5v and 3.3v regulator circuits using the combinations of regulators and
capacitors.
Add proper power connections to the microcontroller pins.
Connect the reset pin of the IC socket to a 10K resistor.
Connect the crystal oscillators to pins 9 and 10
Connect the led to the appropriate pin.
Mount the female headers onto the board and connect them to the respective pins on
the chip.
Mount the row of 6 male headers, which can be used as an alternative to upload
programs.
Upload the program on the Microcontroller of the readymade Adruino and then pry it
off and place back on the user kit.
1. It is inexpensive
2. It comes with an open source hardware feature which enables users to develop their
own kit using already available one as a reference source.
3. The Arduino software is compatible with all types of operating systems like
Windows, Linux, and Macintosh etc.
4. It also comes with open source software feature which enables experienced software
developers to use the Arduino code to merge with the existing programming language
libraries and can be extended and modified.
5. It is easy to use for beginners.
6. We can develop an Arduino based project which can be completely stand alone or
projects which involve direct communication with the software loaded in the
computer.
7. It comes with an easy provision of connecting with the CPU of the computer using
serial communication over USB as it contains built in power and reset circuitry.
So this is some basic idea regarding an Arduino. You can use it for many types of
applications. For instance in applications involving controlling some actuators like motors,
generators, based on the input from sensors.
Photos Credit:
Finger print lock
There is a short video for this Arduino fingerprint lock here:
http://v.youku.com/v_show/id_XNjIxNzQyNzY4.html
I live in a small apartment in Shenzhen with my wife and baby, 5 months old.
diapers for my baby. But always I forget to carry my keys, so I need to knock at
the door or call my wife to open the door for me, and, always wake up my baby
and begins to cry.
the problem.
A fingerprint lock would be help for me, and there are plenty of these kinds of
locks on the market, as the picture above. But it is not only expensive, and, it is
also very troublesome to install. I hope to find a cheap way and do need not
change my locks.
After learning Arduino for 2 weeks, I decided to DIY a fingerprint lock, with
Arduino.
Remove these ads by Signing Up
As you can see, as long as the red part of the figure pulled in the direction of the
arrow, the door can be unlocked, and of cause, when not pulled, the red part go
back to it’s original location to lock the door. So I think, a servo would be OK
And, i need a fingerprint sensor, too, when i or my wife press the fingerprint
because it is cheap enough, and has some upgrading on the design, such as the
2. FingerPrint Sensor
relatively simple.
Servo:
Fingerprint module:
the fingerprint module communicate with Crowduino using serial
communication protocol, but since Crowduino has only one hardware serial port
that I need to use for the PC communication, I use Arduino Soft Serial to
You can connect these modules to Crowduino as the picture above , and Note
that both the module uses 5V power supply, you can connect one of their power
location to the location of your download code( as above picture), and click OK
Open the Arduino IDE, open the File -> Sketchbook -> enroll, you will see the
After downloading the sketch enroll to Crowduino, Open the serial monitor,
and set the baud rate to 38400, you will see the outputs from the serial monitor
This number represents the fingerprint number that you will input. The
fingerprint can store up to 120 fingerprints on default. Here we input the first
fingerprint, input “1a”, and press the carriage to input. the serial output will
After your pressing, the outputs on the serial monitor will remind you to move
off your finger, and then reminds you press the fingerprint again to double
check. Act as the serial outputs, you can complete all the steps easily.
Crowduino to make the system working as your guide. Open the Arduino
IDE,Open File -> Sketchbook -> fingerprint and download this program to
Crowduino.
After the downloading or the program fingerprint, have a try to press the
fingerprint with the finger you input in step4, If the Crowduino recognize your
finger, the servo will rotate some degrees to open the door. And after 2 seconds,
glue, maybe you have some other solution! i adjust the position within 2
It seems the wires is somewhat a mess, but believe me it does not affect the
function, also, I believe you must have a better way to make these wires more
organized.
Power up the system with 5V USB power or 9V DC Jack power, have a try to
Main programs
Enrol
/*
enroll.ino
#include <Adafruit_Fingerprint.h>
#include <Streaming.h>
#include <SoftwareSerial.h>
void setup()
Serial.begin(38400);
finger.begin(19200);
if (finger.verifyPassword())
else
while (1);
}
void loop() // run over and over again
uint8_t id = 0;
while (Serial.available())
char c = Serial.read();
while (true)
while (! Serial.available());
char c = Serial.read();
if (! isdigit(c))
while(Serial.available())
c = Serial.read();
}
break;
id *= 10;
id += c - '0';
Serial.print("Enrolling ID #");
Serial.println(id);
while (!getFingerprintEnroll(id));
uint8_t p = -1;
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
//Serial.println(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
// OK success!
p = finger.image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
return p;
case FINGERPRINT_INVALIDIMAGE:
return p;
default:
Serial.println("Unknown error");
return p;
Serial.println("Remove finger");
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
p = -1;
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
//Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
// OK success!
p = finger.image2Tz(2);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
return p;
case FINGERPRINT_INVALIDIMAGE:
default:
Serial.println("Unknown error");
return p;
// OK converted!
p = finger.createModel();
if (p == FINGERPRINT_OK) {
Serial.println("Prints matched!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_ENROLLMISMATCH) {
return p;
} else {
Serial.println("Unknown error");
return p;
}
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.println("Stored!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_BADLOCATION) {
return p;
} else if (p == FINGERPRINT_FLASHERR) {
return p;
} else {
Serial.println("Unknown error");
return p;
}
Main program
/*
fingerprint.ino
Author:Vigoss.kk
www.elecrow.com
2013-10-6
version 2.1 of the License, or (at your option) any later version.
the GNU
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
*/
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
#include <Servo.h>
#if __Debug
#else
#define DBG(X)
#endif
servo
void open_close_door()
myservo.attach(pinServo);
myservo.write(i);
delay(5);
delay(2000);
myservo.write(i);
delay(5);
myservo.detach();
}
void setup()
Serial.begin(38400);
finger.begin(19200);
delay(500);
DBG("setup ok!");
if(getFingerprintIDez()>=0)
open_close_door();
delay(2000);
delay(50);
}
int getFingerprintIDez()
if (!finger.verifyPassword())
return -1;
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK)
return -1;
p = finger.image2Tz();
if (p != FINGERPRINT_OK)
{
return -1;
p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK)
return -1;
#if __Debug
Serial.print("Found ID #");
Serial.print(finger.fingerID);
DBG(finger.confidence);
#endif
return finger.fingerID;
}
/
****************************************************************
*****************************************
END FILE
****************************************************************
*****************************************/
Use of Fingerprint scanners
Suppose you have a fingerprint scanner enabled laptop. You need to visit a site which you
haven’t seen for a long time. You even forgot the password to see your own profile. Thus you
will have to get a new password by entering your e-mail address. All these problems can be
solved by using a password storing fingerprint reader.
The main thing to do is use the same password and user-name for all websites that you use.
Store the password in the fingerprint scanner software. Scan your finger with the help of the
device and store it in reference to the password and user-name you have provided. Thus,
when you visit the site again in future, all you have to do is swipe your finger on the device
and the associated user-name and password will be filled automatically to the site.
The scanning procedure can also be used for identity recognition as well as locking and
protecting your computer files.
This identification device has been commercialized from the late 19 th century. The device is
the most popular among all the identification devices because of its ease in acquisition, and
also the number of sources that are available for its data collection. It has found its vast use in
law enforcement and immigration purposes. The basics of this identification process comes
from “Galton points” – a certain characteristics defined by Sir Francis Galton, through which
the fingerprints can be identified.
The exact automation of this technology began in the year 1969, when the FBI wanted an
identification system using fingerprints. For this the FBI made deals with the National
Institute of Standards and Technology (NIST), to make developments on the searching,
matching as well as scanning process. For this, the NIST worked with the minutiae
technology, which is actually a smaller version of Galton points to develop the fingerprint
scanning technology. The two main problems they faced were extracting the minutiae from
each fingerprint and also comparing, matching and also searching the lists of minutiae from
large list of fingerprints. The best prototype was first exhibited in the year 1975 by the FBI. A
capacitive scanning technique was used as its working basics. More work on making
automatic digital inked fingerprints, compression of the image and so on is still being done.
About fingerprints
Before going in detail about the technology used, it is very important to know about the
basics of our fingerprints. The basic information about fingerprint is that it is unique for each
person. Even a twin brother will not have the same fingerprint. Thus each fingerprint is used
to store a unique identifiable piece of information. The uniqueness in each fingerprint is due
to the peculiar genetic code of DNA in each person. This code causes the formation of a
different pattern of our fingerprint.
A fingerprint consists of ridges and valleys. They together provide friction for the skin. The
main identification of the skin is based upon the minutiae, which actually is the location and
direction of the ridge endings and splits along a ridge path. The image shown below
represents two types of minutiae. Take a look.
Fingerprint
The image below shows all the other characteristics of a fingerprint. These characteristics
may also be helpful during the process of minutiae extraction. Take a look.
Fingerprint Characteristics
The unique information used for the identification includes the flow of the friction ridges, the
sequence and also the presence/absence of the individual friction ridge path features.
There are mainly two types of scanning methods for this technology. Either an optical or
capacitance scanner is used to scan and make a picture of your finger. Though both the
methods produce the same type of image, the making of it is completely different.
This scanned image is then compared with an earlier existing finger print of yours to get the
correct identity. The comparison is carried out by the processor and the comparison is made
between the valleys and ridges. Though the steps are simple, very complex algorithms must
be carried out to perform this operation. Though your whole fingerprint is recorded, the
computer takes only parts of the print to compare with other records.
1. Optical Scanner
The main part of an optical scanner is the Charge Coupled Device. To know more about it
click on the link below.
The electrical signal created in response to the light hitting on the CCD forms pixels which
are collectively joined to form an image. These pixels are converted using and ADC to make
a digital image.
The scanning device consists of a glass plate, on top of which you are supposed to place your
finger. After the scanning takes place, an inverted image of the finger is stored. This image
will show the ridges and valleys of your finger. The ridges can be spotted by the darker areas
where the light reflection is greater. The valleys can be spotted by the lighter areas, where the
light reflected is lesser.
The scanner is also designed to recheck the image captured. The scanner checks whether the
image captured has an satisfactory pixel darkness. If a problem is seen in the checking
process, the image will be rejected and the suitable adjustments will be made so as to get a
better quality picture. After all these procedures, the image will be compared with the
existing stored images.
2. Capacitance Scanner
While an optical scanner uses light to scan the image, a capacitance scanner uses electrical
current to display the image
The principle of capacitance is used in this device. As shown in the diagram, each sensor
consists of arrays of cells. These cells have two conductor plates, which are covered with an
insulating layer. Thus, they form a simple capacitor which is used to store the charge. The
cells are so small that their actual size will be smaller than the width of a ridge from our
finger. These sensors will then be connected to an integrator. The output of the integrator will
be given to the input of an inverting operational amplifier. This op-amp will consist of
hundreds of transistors, resistors and capacitors. This op-amp is alters the input voltage with
respect to the reference voltage provided to the other input. The non-inverting input is
connected to the ground. The inverting input is given to the reference voltage and then to the
feedback circuit. This feedback circuit is given to the amplifier output and also includes the
two conductor plates.
When the finger is placed for recognition, it acts as another capacitor plate. It is separated
with the help of insulating layers. When moving the finger from one point to another, the
capacitance changes due to the variation in distance between the capacitor plates. Thus, the
output voltage is recorded with the change in output voltage according to the appearance of
ridges and valleys. A perfect output image of the fingerprint is thus obtained.
This device is much better than an optical scanner as it is very compact and harder to trick.
The device needs a real fingerprint shape to get the output. The optical scanner a dark and
light pattern is more than enough to make an output image. Though an optical scanner needs
CCD devices for sensing, a capacitance scanner needs only semi-conductor chips.
Advantages
Disadvantages
An optical scanner can be fooled by showing a picture of a finger instead of a real finger.
Capacitance scanners can also be fooled by swiping a mould of a finger by including ridges
and valleys. If it is some serious business, a thief could also cut-off the person’s finger and
swipe it on the scanner.
If you have misplaced your credit card you can easily get a new one. But, if someone has
moulded a same fingerprint as yours, there is no way to replace it.
Dc power supply
The most common and inexpensive plugpack power supply type you'll see is the chunky transformer
based plug. Whenever you buy some consumer electronics you'll be getting one of these:
These guys are everywhere - all sorts of voltage and current ratings. They're available for
sale at any store just about, but there are some big things to watch out for! One is that the
output voltage is not going to be 9V (for example) out of the box, that voltage rating is just
the minimum output for the current rating (200mA for example). And also, the output is
going to have a lot of ripple on it!
Before we talk precisely about these guys, lets go back in time to when engineers had to build
their power supplies with their bare hands!
Transformers
We aren't going to get into the heavy detail of the electromagnetic theory behind transformers
except to say that they are made of two coils of wire around a chunk of iron. If the number of coils
are the same on both sides then the AC voltage is the same on both sides. If one side has twice the
coils, it has twice the voltage. They can be used 'backwards' or 'forwards'! For more detailed
information, be sure to check out the wikipedia page.
To use it, one half would get wired up to the wall (the 'primary' 'high side')
and the other half would output 12V AC (the 'secondary' 'low side'). The transformer
functioned in two ways: one it took the dangerous high voltage and transformed it to a much
safer low voltage, second itisolated the two sides. That made it even safer because there was
no way for the hot line to show up in your electronics and possibly electrocute you.
We'll use a schematic symbol to indicate a transformer, its two coils inside which are drawn
out, the schematic symbol will have the same number of coils on either side so use common
sense and any schematic indicators to help you out in figuring which is primary and which is
secondary!
You'll want to use a power diode such as a 1N4001 , they're extremely common and can put up with
a lot of abuse. The side with the silver stripe matches the schematic symbol side that the 'arrow' in
the diode symbol is pointing to. That's the only direction that current can flow. The output is then
chopped in half so that the voltage only goes positive.
This will convert
into
What we have now isnt really AC and isn't really DC, its this lumpy wave. The good news is
that it's only positive voltage'd now, which means its safe to put a capacitor on it.
This is a 2200 microFarad (0.0022 Farad) capacitor, one leg has (-) signs next to it, this is the
negative side. The other side is positive, and there should never be a voltage across is so that
the negative pin is 'higher' than the positive pin or it'll go POOF!
A capacitor smooths the voltage out, taking out the lumps, sort of how spring shocks in car or
mountain bike reduce the bumpiness of the road. Capacitors are great at this, but the big capacitors
that are good at this (electrolytic) can't stand negative voltages - they'll explode!
Because the voltage is very uneven (big ripples), we need a really big electrolytic-type
capacitor. How big? Well, there's a lot of math behind it which you can read about but the
rough formula you'll want to keep in mind is:
For a half wave rectifier (single diode) the frequency is 60 Hz (or 50 Hz in europe). The
current draw is how much current your project is going to need, maximum. The ripple
voltage is how much rippling there will be in the output which you are willing to live with
and the capacitor size is in Farads.
So lets say we have a current draw of 50 mA and a maximum ripple voltage of 10mV we are
willing to live with. For a half wave rectifier, the capacitor should be at least = 0.05 / (60 *
0.01) = 0.085 Farads = 85,000 uF! This is a massive and expensive capacitor. For that
reason, its rare to see ripple voltages as low as 10mV. Its more common to see maybe 100mV
of ripple and then some other technique to reduce the ripple, such as a linear regulator chip.
You don't have to memorize that formula, but you should keep the following in mind: When
the current goes up and the capacitor stays the same, the ripple goes up. If the current goes
up and you want the ripple the same, the capacitor must also increase.
So now we get:
As you can see, there are twice as many humps - there isnt that "half the time, no voltage" thing
going on. This means we can divide the calculated capacitor size to half of what it was in the
previous.
Basically, a full wave rectifier is way better than a half wave! So why even talk about half-wave type
rectifiers? Well, because they're useful for a few other purposes. In general, you're unlikely to see an
AC/DC converter that uses a half wave as the cost of the diodes makes up for the saving in capacitor
size and cost!
The transformer AC/DC in practice
OK now that we've reviewed transformers, diodes when used as rectifiers and big capacitors, lets
look at a chunky plugpack again. This time, we'll look inside by cutting it in half! This power supply is
rated at9VDC @ 200mA.
We can pull it out completely to see the circuit board parts.
Wow so this looks really familiar, right? From let to right, you can see the wires that come
into the transformer from the wall plug, the transformer output has two power diodes on it
and a big capacitor (2,200uF). You might be a little puzzled at the two diodes - shouldn't
there be four for a full-wave rectifier? It turns out that if you have a special transformer made
with a 'center tap' (a wire that goes to the center) you can get away with using only two
diodes . So it really is a full wave rectifier, just one with a center-tap transformer.
These transformer-based plug-packs are really cheap to make - like on the order of under $1!
Yow! 14V? That's not anything like the 9V on the package, is this a broken wall wart? No! Its totally
normal! Transformer-based wall adapters are not designed to have precision outputs. For one thing,
the transformer, if you remember, is made of coils of wire. The coils for the most part act like
inductors but they still have some small resistance. For example, if the coil is 10 ohms of resistance,
then 200 mA of current will cause V = I * R = (0.2 Amps) * (10 ohms) = 2 Volts to be lost just in the
copper winding! Another thing that causes losses is the metal core of the transformer becomes less
efficient as the amount of current being transformed increases. Altogether, there are many
inefficiencies that will make the output fluctuate. In general, the output can be as high as twice the
'rated' voltage when there is less than 10mA of current being drawn.
As the resistance gets smaller and smaller, the current draw gets higher and higher and the
voltage droops (that's the technical term for it!) You can also see the ripple increase as the
current goes up.
Now we can at least understand the thinking behind saying "9V 200mA" on the label. As
long as we are drawing less than 200mA the voltage will be higher than 9V.
For example, lets say you have a microcontroller project and it requires 5V power as many
DIY projects do. You shouldn't go out and buy a 5V transformer supply like the one above
and just stick the power output into your microcontroller - you'll destroy it! Instead, you will
need to build a 5V regulator like the common LM7805 that will take the somewhere-around-
9V from the transformer and convert it to a nice steady 5V with almost no ripple.
You might be wondering well why on earth doesn't someone make a power plug that takes a
transformer and some diodes and a LM7805 and that will give you a nice 5V output instead
of having everyone build it into the project circuit? While its an interesting idea there are a
few reasons they don't do that. One is that the enclosed wall adapter would overheat. Another
is that some projects need more than one voltage, say 5V and 3.3V both. But in the end, its
probably for manufacturing simplicity. The factory that makes the wall plugs makes 100's of
thousands in predictable sizes and rates, each country has plenty of factories to make the right
plug packs for the wall voltage and plug style. The designers of, say, the DVD player have an
easier time of it when they can just say "anything above 7V and below 20V input will work
for us" and the plug-pack maker matches them up with the closest thing they already make.
Nowadays, there are switch-mode power plugs that solve much of this problem. They are
thinner and lighter than transformers and have almost no heating problems so they can have
precise outputs that don't fluctuate. However, circuit-wise they are much more complex
which means they're also much more expensive than transformer-supplies, perhaps 5-10x the
price, and have a downside that they're 'noisier' electrically. But, because the parts and
assembly cost is going down, they're much more popular than they were even 10 years ago.
There are some special types of application of electrical motor where rotation of the motor is
required for just a certain angle not continuously for long period of time. For these
applications some special types of motor are required with some special arrangement which
makes the motor to rotate a certain angle for a given electrical input (signal). For this purpose
servo motor comes into picture. This is normally a simple DC motor which is controlled for
specific angular rotation with help of additional servomechanism (a typical closed loop
feedback control system). Now day’s servo system has huge industrial applications. Servo
motor applications are also commonly seen in remote controlled toy cars for controlling
direction of motion and it is also very commonly used as the motor which moves the tray of a
CD or DVD player. Beside these there are other hundreds of servo motor applications we see
in our daily life. The main reason behind using a servo is that it provides angular precision,
i.e. it will only rotate as much we want and then stop and wait for next signal to take further
action. This is unlike a normal electrical motor which starts rotating as and when power is
applied to it and the rotation continues until we switch off the power. We cannot control the
rotational progress of electrical motor; but we can only control the speed of rotation and can
turn it ON and OFF.
Now we come to the specific answer of the question “what is servo motor?”
Servo motor is a special type of motor which is automatically operated up to certain limit for
a given command with help of error-sensing feedback to correct the performance.
Servomechanism
A servo system mainly consists of three basic components – a controlled device, a output
sensor, a feedback system.
This is an automatic closed loop control system. Here instead of controlling a device by
applying variable input signal, the device is controlled by a feedback signal generated by
comparing output signal and reference input signal.
When reference input signal or command signal is applied to the system, it is compared with
output reference signal of the system produced by output sensor, and a third signal produced
by feedback system. This third signal acts as input signal of controlled device. This input
signal to the device presents as long as there is a logical difference between reference input
signal and output signal of the system. After the device achieves its desired output, there will
be no longer logical difference between reference input signal and reference output signal of
the system. Then, third signal produced by comparing theses above said signals will not
remain enough to operate the device further and to produce further output of the system until
the next reference input signal or command signal is applied to the system. Hence the primary
task of a servomechanism is to maintain the output of a system at the desired value in the
presence of disturbances.
A servo motor is basically a DC motor(in some special cases it is AC motor) along with some
other special purpose components that make a DC motor a servo. In a servo unit, you will
find a small DC motor, a potentiometer, gear arrangement and an intelligent circuitry. The
intelligent circuitry along with the potentiometer makes the servo to rotate according to our
wishes.
As we know, a small DC motor will rotate with high speed but the torque generated by its
rotation will not be enough to move even a light load. This is where the gear system inside a
servomechanism comes into picture. The gear mechanism will take high input speed of the
motor (fast) and at the output, we will get a output speed which is slower than original input
speed but more practical and widely applicable.
Say at initial position of servo motor shaft, the position of the potentiometer knob is such that
there is no electrical signal generated at the output port of the potentiometer . This output port
of the potentiometer is connected with one of the input terminals of the error detector
amplifier. Now an electrical signal is given to another input terminal of the error detector
amplifier. Now difference between these two signals, one comes from potentiometer and
another comes from external source, will be amplified in the error detector amplifier and
feeds the DC motor. This amplified error signal acts as the input power of the dc motor and
the motor starts rotating in desired direction. As the motor shaft progresses the potentiometer
knob also rotates as it is coupled with motor shaft with help of gear arrangement. As the
position of the potentiometer knob changes there will be an electrical signal produced at the
potentiometer port. As the angular position of the potentiometer knob progresses the output
or feedback signal increases. After desired angular position of motor shaft the potentiometer
knob is reaches at such position the electrical signal generated in the potentiometer becomes
same as of external electrical signal given to amplifier. At this condition, there will be no
output signal from the amplifier to the motor input as there is no difference between external
applied signal and the signal generated at potentiometer . As the input signal to the motor is
nil at that position, the motor stops rotating. This is how a simple conceptual servo motor
works.
The shaft of the DC motor is coupled with another shaft called output shaft, with help of gear
assembly. This gear assembly is used to step down the high rpm of the motor’s shaft to low
rpm at output shaft of the servo system.
The voltage adjusting knob of a potentiometer is so arranged with the output shaft by means
of another gear assembly, that during rotation of the shaft, the knob also rotates and creates
an varying electrical potential according to the principle of potentiometer . This signal i.e.
electrical potential is increased with angular movement of potentiometer knob along with the
system shaft from 0° to 45°. This electrical potential or voltage is taken to the error detector
feedback amplifier along with the input reference commends i.e. input signal voltage.
As the angle of rotation of the shaft increases from 0° to 45° the voltage from potentiometer
increases. At 45° this voltage reaches to a value which is equal to the given input command
voltage to the system. As at this position of the shaft, there is no difference between the
signal voltage coming from the potentiometer and reference input voltage (command signal)
to the system, the output voltage of the amplifier becomes zero.
As per the picture given above the output electrical voltage signal of the amplifier, acts as
input voltage of the DC motor. Hence the motor will stop rotating after the shaft rotates by
45°. The motor will be at this rest position until another command is given to the system for
further movement of the shaft in desired direction. From this example we can understand the
most basic servo motor theory and how servo motor control is achieved.
NB: Although in practical servo motor control system, instead of using simple potentiometer
we use digital or analog position sensor encoder.
From this basic working principle of servo motor it can be concluded. The shaft of the
servo is connected to a potentiometer . The circuitry inside the servo, to which the
potentiometer is connected, knows the position of the servo. The current position will be
compared with the desired position continuously with the help of an Error Detection
Amplifier. If a mismatch is found, then an error signal is provided at the output of the error
amplifier and the shaft will rotate to go the exact location required. Once the desired location
is reached, it stops and waits.
Continuous rotation servo motors are actually a modified version of what the servos are
actually meant to do, that is, control the shaft position. The 360° rotation servos are actually
made by changing certain mechanical connections inside the servo. However, certain
manufacturer like parallax sells these servos as well. With the continuous rotation servo you
can only control the direction and speed of the servo, but not the position.
Two of the most popular Servo motor manufacturers are FUTABA and HITEC.