3 Digital RPM Meter Using Arduino Report
3 Digital RPM Meter Using Arduino Report
Introduction
Tachometer is a RPM counter which counts the no. of rotation per minute. There are two
types of tachometer one mechanical and other one is digital. Here we are going to design
an Arduino based digital tachometer using IR sensor module to detect object for count
rotation of any rotating body. As IR transmits IR rays which reflect back to IR receiver
and then IR Module generates an output or pulse which is detected by the arduino
controller when we press start button. It counts continuously for 5 seconds.
LITERATURE SURVEY
DR.RAMKRISHNAN IYER
For the sake of time, our team will be focusing primarily on boards manufactured by
Arduino and Raspberry Pi; these two companies have the most widely available
information and ample amount of example projects of which, for the most part, the
inventors of such projects have posted schematics and coding in an open-source spirit.
Because of this, a wide array of information is at our fingertips.
2.2 Arduino
2.3 Arduino BT
The Arduino BT is a microcontroller board based on the ATmega328 and the Bluegiga
WT11 Bluetooth module. Figure 2.1 is an image of the top of an Arduino BT. The Board
Arduino BT supports wireless serial communication over Bluetooth, but is not
compatible with Bluetooth headsets or other audio devices . It has 14 digital input/output
pins of which 6 can be used as PWM outputs and one can be used to reset the WT11
module, 6 analog inputs, a 16 MHz crystal oscillator, screw terminals for power, an ICSP
header, and a reset button. It contains everything needed to support the microcontroller
and can be programmed wirelessly over the Bluetooth connection.
2.4 Ct Sensor
A Ct sensor is a device that is used to interface with an Arduino plugged into the direct
voltage to divert the I pulses of the electrons in order for the Arduino to better interpret
the information instead of having it overflow with voltage hurt someone is an image of
CT sensors
There are a few main ways users interact with the many devices that are user friendly:
User Interface (UI) Interface Device (IDF) Human-Computer Interface (HCI)
Graphical User Interface (GUI) By interacting with a computer, the user is allowed to
access documents, search on different browsers, create documents, search the web, watch
videos, etc. Interacting with devices are more broad now for users because hand-held
devices like most cellular phones today have built in CPUs enabling the users to access
the web from any place that they want
THEORY
3.1 Hardware
Figure no 3.1
In Hardware section we thoroughly discuss about the comparator circuit and the following parts.
HARDWAREIR PAIR
IC 741c
BJT
LCD
IR-PAIR: An IR-Pair is consisted of a infrared LED & a phototransistor. Here infrared LED
works as transmitter & phototransistor works as a receiver. When this pair is accordingly biased
with 5V dc infrared LED begin to transmit the infrared beam. If the beam is received through the
phototransistor the output voltage across it is increased.
Here in our circuit we use this device to convert the analog voltage signal into digital
voltage signal
BJT:A bipolar junction transistor (BJT or bipolar transistor) is a type of transistor that
relies on the contact of two types of semiconductor for its operation. BJTs can be used as
amplifiers, switches, or in oscillators. BJTs can be found either as individual discrete
components, or in large numbers as parts of integrated circuits.
LCD:The LCDs have a parallel interface, meaning that the microcontroller has to manipulate
several interface pins at once to control the display. The interface consists of the following pins:
A register select (RS) pin that controls where in the LCD's memory you're writing data to. You
can select either the data register, which holds what goes on the screen, or an instruction register,
which is where the LCD's controller looks for instructions on what to do next.
A Read/Write (R/W) pin that selects reading mode or writing mode. An Enable pin that
enables writing to the registers.8 data pins (D0 -D7). The states of these pins (high or
low) are the bits that you're writing to a register when you write, or the values you're
reading when you read.
There's also a display contrast pin (Vo), power supply pins (+5V and Gnd) and LED
Backlight
(Bklt+ and BKlt-) pins that you can use to power the LCD, control the display contrast,
and turn on and off the LED backlight, respectively.
3.2Arduino
To take the outputs from comparator circuit & compute the data for calculation and to control the
LCD, here we use a microcontroller at mega 238p which comes with arduino which is an open-
source electronics prototyping platform. Arduino can sense the environment by receiving input
from a variety of sensors and can affect its surroundings by controlling lights, motors, and other
actuators. The microcontroller on the board is programmed using the Arduino programming
language (based on Wiring) and the Arduino development environment (based on Processing).
Arduino projects can be standalone or they can communicate with software running on a
computer (e.g. Flash, Processing, MaxMSP).We use arduinouno to make our task easy. The
Microcontroller ATmega328
Operating Voltage: 5V
Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started."Uno" means one in Italian
and is named to mark the upcoming release of Arduino
Power: The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically. External (non-USB) power can come either
from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in
the Gnd and Vin pin headers of the POWER connector. The power pins are as follows:VIN: The
input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts
from the USB connection or other regulated power source). You can supply voltage through this
pin, or, if supplying voltage via the power jack, access it through this pin.
5V:This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 -12V), the USB connector (5V), or the VIN pin of
the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage your board. We don't advise it.
3V:A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select
the appropriate power source or enable voltage translators on the outputs for working with the 5V
or 3.3V.
Memory: The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Input and Output:Each of the 14 digital pins on the Uno can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 kOhms. In addition, some pins have
specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using
the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13: When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analogReference() function.
Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:
AREF: Reference voltage for the analog inputs. Used with analogReference().
Reset:Bring this line LOW to reset the microcontroller. Typically used to add a reset button
3.3 SOFTWARE
A program needs to link between arduino and the hardware. This program is written on C++
language at arduino IDE platform. The program is given below:
Here we discussed the built in function that were used to complete the program:
begin(): Initializes the interface to the LCD screen, and specifies the dimensions (width and
height) of the display. begin() needs to be called before any other LCD library commands.Syntax:
lcd.begin(cols,rows). Parameters-lcd: a variable of type LiquidCrystal.cols: the number of
columns that the displayhasrows: the number of rows that the display has.
setCursor(): Position the LCD cursor; that is, set the location at which subsequent text written
to the LCD will be displayed
col: the column at which to position the cursor (with 0 being the first column).row: the row at
which to position the cursor (with 0 being the first row).
attachInterrupt(): Specifies a named Interrupt Service Routine (ISR) to call when an interrupt
occurs. Replaces any previous function that was attached to the interrupt. Most Arduino boards
have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3).Interrupts are
useful for making things happen automatically in microcontroller programs, and can help solve
timing problems. Good tasks for using an interrupt may include reading a rotary encoder, or
monitoring user input. Syntax: attachInterrupt(interrupt, ISR, mode). Parameters-interrupt: the
number of the interrupt (int). ISR: the ISR to call when the interrupt occurs; this function must
take no parameters and return nothing. This function is sometimes referred to as an interrupt
service routine. mode: defines when the interrupt should be triggered. Four contstantsare
predefined as valid values:LOW to trigger the interrupt whenever the pin is low. CHANGE to
trigger the interrupt whenever the pin changes value.
RISING to trigger when the pin goes from low to high. FALLING for when the pin goes from
high to low.
Here we use IC 7805 for voltage regulation so that we can get 5V constant dc supply from its
output. Then we setup the comparator circuit. When the IR-pair is disconnected we set the voltage
of pin 3 of IC 741 at 0.34V & voltage of pin 2 is 0.15V. As a result we get high output voltage at
pin 6 about 4.23V. Here we use reflection method to link between Infrared LED &
phototransistor. When this pair is connected the pin 2 voltage goes high about 4.6V. As a result
we get the lower output voltage about1.13V. To improve these outputs we use a BJT BD135. We
connect a resistor valued 470 ohm with the collector to pull-up the output voltage 4.23V to 5V.
We also connect a led parallel with that resistor to indicate when the link is created between the
infrared led & phototransistor. The output from the collector is then connected to the digital pin 2
of arduino. To control the lcd we use the following connection: LCD Pin out
12 RS
11 E
10 DB 0
09 DB 1
08 DB 2
07 DB 3
06 DB 4
05 DB 5
04 DB 6
03 DB 7
Table no :- 3.3 Arduino pin connection
VSS Ground
R/W Ground
Vcc 5V
Vo Mid-point of a 50 K trimmer
LED + 5V
LED -Ground
3.6 Advantages
3.7 Disadvantages
Since the digital tachometer is held in hand, slight variation in its positionchanges
its speed.
If the speed is varying at every instant then the digital display fluctuatesand
makes it difficult to read the actual speed
Future Development
People counter.
We use our rpm meter to control the speed of a low volt DC motor. For this we only need
to develop our coding section not the hardware section.
Circuit can be modified to get speed in rpm using DAC,ADC & op-amp
5.1Conclusions
Overall I consider this project to be a success. The results were actually more promising
than the PIC tachometer...Although, I blame that on both time and experience. Anyway,
the system worked as we designed it and reliably enough that we saw the results we were
hoping for...3000 RPM fans ran at about 3000 RPM and so on. I hope you enjoyed
reading this article and learned something about build your own tachometer with an
Arduino!
5.2Reference
[1] Coughling& Driscoll, Operational amplifier & Linear integrated Circuits, 6th edition,
Prentice-Hall India.
[5] S. Ueha and Y. Tomikawa, Ultrasonic Motors: Theory and Applications. Oxford
U.K.: Clarendon, 1993, pp.4-6.
[6] T. Sashida and T. Kenjo, an Introduction to Ultrasonic Motors. Oxford, U.K.:
Clarendon, 1993, pp.6-8.
[7] K. Uchino, Piezoelectric Actuators and Ultrasonic Motors. Boston, U.S.A.: Kluwer,
1997, pp. 265-273