Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Tachometer is a measuring instrument used for measuring the speed of a rotating body. The
unit of measured speed by tachometer is expressed in revolution per minute or RPM.
Tachometers were purely mechanical in past. In that time, the speed measuring parameters
were sent to the tachometer through mechanical coupling (cable or shaft) and the rpm is
measured using a gear mechanism and it is identified using needle mechanism. The
tachometers have changed a lot due to rapid development of modern electronics. This article
is for a contactless digital tachometer using Arduino. Here the speed of the motor is also
controlled. The RPM, the duty cycle and other information are displayed on a LCD screen.
Tachometer is an essential instrument in this modern era of industrialization. In industry it is
necessary to control the speed of motor at a definite RPM and for this counting of RPM is
essential. Tachometer is an instrument used for measuring the number of revolution of an object
in a given interval of time. Usually it is expressed in revolution per minute or RPM. Earlier
tachometers are purely mechanical where the revolution is transferred to the tachometer
through mechanical coupling (cable or shaft), the rpm is determined using a gear mechanism
and it is displayed on a dial. With the advent of modern electronics, the tachometers have
changed a lot. This project is about a contactless digital tachometer using Arduino. The speed
of the motor can also be controlled with the circuit.
Arduino UNO
This microcontroller is based on the ATmega 328. There are total of 20 pins (0-19) out
of which 6 are analog inputs which can also be used as general purpose pins, a ceramic
resonator of frequency 16MHz, an USB connection, a power jack and a reset button. It contains
everything needed to support a microcontroller.
A microcontroller often serves as the “brain” of a mechatronic system. Like a mini,
self-contained computer, it can be programmed to interact with connected hardware and/or a
user, much like a PC connected to a small network of hardware. As the computer industry has
evolved, so has the technology associated with microcontrollers. Every year microcontrollers
become much faster, have more memory, and extend their input and output feature sets, all the
while becoming even cheaper and easier to use.
Even the most basic microcontroller units (MCUs) can perform simple math operations,
monitor (read) analog/digital inputs, and control (write) analog/digital outputs. Most modern
controllers have analog-to-digital converters (ADCs), high-speed timers, counters and
comparators, interrupt capabilities, PWM outputs for producing square-waves, and a variety of
serial communication ports. All of these can be used to interact with the board's immediate
environment for a very wide variety of purposes.
The development board used in this course is called the Arduino. The name Arduino is
(admittedly somewhat ambiguously) used to denote the hardware board, the software
development environment, its library of easy-to-use software functions, and/or the layout
standard of the original version's connection headers, depending on the context. As you will
learn in the next few weeks, it is not necessary to use the Arduino IDE or libraries to use the
Arduino hardware if your requirements dictate otherwise.
The name “Arduino” is a copyright held by the original team based in Italy that
originally built the hardware, the IDE (integrated development environment) and the software
libraries. It was designed to be a platform for physical computing usable primarily by non-
programmers (artists, hobbyists, teachers, students, etc.). Another goal of the project was that
all of the hardware designs (except those for the chips themselves) as well as the software tools
are open-source – free to copy and distribute without any licensing restrictions. By making an
easy-to-use, easy-to-make platform, they hoped that it would enable a wide variety of
interactive and creative uses by an even greater variety of users. Its popularity and use has
spread much wider than originally anticipated. It's estimated that roughly 400,000 Arduinos
and Arduino-compatible boards have been made and/or sold by the end of 2011, and could
reach one million by the end of 2012. There are also dozens of variations of the Arduino
serving specific niche purposes such as robot/motor control, miniaturized applications, UAVs,
sensor networks, etc.
The board is most often powered from the USB connector on the upper-left side during
software development. The USB connection is the programming link over which programs
compiled on your computer are transferred to the MCU. This connection also may be used to
exchange data between the board and your computer.
For greater portability, the board can be untethered from the computer and separately
powered via the 2.1 mm barrel jack in the lower left corner with either a battery pack or a 6-20
VDC (7-12 VDC recommended) AC-to-DC wall adapter. You may also connect a similar voltage
source to the Vin pin in the power-ground header. The final, but less used, alternative is to
attach a regulated 5V power supply directly to the 5V POWER header pin near the center-
bottom of the board.
The Arduino board comes with a single LED, often called the Pin 13 LED because it is
electrically connected to Digital Pin 13. This LED is the board's only built-in indicator
accessible to programs. As you will soon see, you may bring more of your own input and
output devices to the party and connect them yourself. A virgin Arduino board comes pre-
programmed with a sample sketch called Blink that flashes the Pin 13 LED once per second.
This feature is handy because you can easily check the general health of your new board simply
by plugging it into USB, and the flashing LED demonstrates that the board is mostly working.
Summary on Arduino
Microcontroller ATMega328
Clock Speed 16MHz
Analog Input pins 6
Digital input output pins 14 (6 pins provide PWM voltage)
Input voltage 6-20V
Operating Voltage 5V
LCD
LCD stands for liquid crystal display. They come in many sizes 8x1, 8x2, 10x2, 16x1, 16x2,
16x4, 20x2, 20x4 ,24x2, 30x2, 32x2, 40x2 etc. Many multinational companies
like Philips Hitachi Panasonic make their own special kind of lcd's to be used in their products.
All the lcd's performs the same functions (display characters’ numbers special
characters ASCII characters etc). Their programming is also same and they all have same 14
pins (0-13) and the lcd has about pins which are generally 16 pins (0 to 15).
LCD
The Character is displayed on lcd screen in 5x8 or 5x7 matrix. Where 5 represents number of
coulombs and 7,8 represent number of rows. Maximum size of the matrix is 5x8. You cannot
display character greater then 5x8 dimension matrix. To display character greater than this
dimension you have to switch too graphical lcd’s.
The command 0x38 means we are setting 8-bit mode lcd having two lines and character
shape between 5x7 matrix.
The command 0x20 means we are setting 4-bit mode lcd having 1 line and character
shape between 5x7 matrix.
The command 0x28 means we are setting 4-bit mode lcd having 2 lines and character
shape between 5x7 matrix.
The command 0x06 is entry mode it tells the lcd that we are going to use you'
The command 0x08 displays cursor off and display off but without clearing DDRAM
contents.
The command 0x0E displays cursor on and display on.
The command 0x0c display on cursor off (displays cursor off but the text will appear
on lcd)
The command 0x0F display on cursor blink (text will appear on screen and cursor will
blink).
The command 0x18 shift entire display left (shift whole off the text on the particular
line to its left).
The command 0x1C shift entire display right (shift whole off the text on the particular
line to its right).
The command 0x10 Moves cursor one step left or move cursor on step ahead to left
whenever new character is displayed on the screen.
The command 0x14 Moves cursor one step right or move cursor on step ahead to right
whenever new character is displayed on the screen.
The command 0x01 clear all the contents of the DDRAM and also clear the lcd removes
all the text from the screen.
The command 0x80 initialize the cursor to the first position means first line first matrix
(start point) now if we add 1 in 0x80+1=0x81 the cursor moves to second matrix.
16x1 lcd displays 16 characters only. The first will appear on 0x80 second 0x81 third 0x82 and
so on until last, the 16 once on address 0x8F.
Before you send commands and data to your lcd. Lcd must first be initialized.
This initialization is very important for lcd that are made by Hitachi because they use HD44780
driver chip sets. Hd44780 Chip set first has to be initialized before using it. If you don't
initialize it properly you will see nothing on your lcd.
In 4-bit mode the high nibble is sent first before the low nibble and the EN pin is toggled each
time four bits is sent to the LCD. To initialize in 4-bit mode:
Buzzer
In our project the buzzer is used for beep sound either indicating the countdown time or wrong
password. It is as shown below:
DC Motor:
Working principle of a DC motor
A motor is an electrical machine which converts electrical energy into mechanical energy. The
principle of working of a DC motor is that "whenever a current carrying conductor is placed
in a magnetic field, it experiences a mechanical force". The direction of this force is given by
Fleming's left hand rule and it's magnitude is given by F = BIL. Where, B = magnetic flux
density, I = current and L = length of the conductor within the magnetic field.
Fleming's left hand rule: If we stretch the first finger, second finger and thumb of our left
hand to be perpendicular to each other AND direction of magnetic field is represented by the
first finger, direction of the current is represented by second finger then the thumb represents
the direction of the force experienced by the current carrying conductor.
Animation: Working of DC Motor
Back EMF
When the armature of the motor is rotating, the conductors are also cutting the magnetic flux
lines and hence according to the Faraday's law of electromagnetic induction, an emf induces
in the armature conductors. The direction of this induced emf is such that it opposes the
armature current (Ia) . The circuit diagram below illustrates the direction of the back emf and
armature current. Magnitude of Back emf can be given by the emf equation of DC generator.
Significance of back emf:
Magnitude of back emf is directly proportional to speed of the motor. Consider the load on a
dc motor is suddenly reduced. In this case, required torque will be small as compared to the
current torque. Speed of the motor will start increasing due to the excess torque. Hence, being
proportional to the speed, magnitude of the back emf will also increase. With increasing back
emf armature current will start decreasing. Torque being proportional to the armature current,
it will also decrease until it becomes sufficient for the load. Thus, speed of the motor will
regulate.
On the other hand, if a dc motor is suddenly loaded, the load will cause decrease in the speed.
Due to decrease in speed, back emf will also decrease allowing more armature current.
Increased armature current will increase the torque to satisfy the load requirement. Hence,
presence of the back emf makes a dc motor ‘self-regulating’.
Types of DC Motors
DC motors are usually classified of the basis of their excitation configuration, as follows -
PRINCIPLE OF WORKING
An Infrared (IR) sensor is used to detect obstacles in front of the robot or to differentiate
between colors depending on the configuration of the sensor.
An IR sensor consists of an emitter, detector and associated circuitry. The circuit required to
make an IR sensor consists of two parts; the emitter circuit and the receiver circuit.
The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode which is sensitive to IR light of the same wavelength as that emitted by the IR LED.
When IR light falls on the photodiode, its resistance and correspondingly, its output voltage,
change in proportion to the magnitude of the IR light received. This is the underlying principle
of working of the IR sensor.
IR sensors are also used to distinguish between black and white surfaces. White surfaces reflect
all types of light while black surfaces absorb them. Therefore, depending on the amount of light
reflected back to the IR receiver, the IR sensor can also be used to distinguish between black
and white surfaces.
Circuit Diagram
IR Emitter Circuit IR Receiver Circuit