Professional Documents
Culture Documents
SMANGALISO P. MAGWAZA
215020390
Discipline of Electrical, Electronic and Computer Engineering
Electrical Engineering Design Project - 2018
Phase 2: Interim ELO Evidence (Student submission)
Student name: Smangaliso P. Magwaza Student number: 215020390
Project title: Design and Implementation of a Non- Contact Tachometer for Speed Measurement of Electrical Motor
Table 1a: ELO1 - Problem solving: Identify, formulate, analyse and solve complex engineering problems creatively and innovatively
1. The problem is defined and the criteria for an acceptable solution are identified. Problem description of the project (page 1).
Principle of operation (page 3).
Software design of the system (page 7-8)
2. Relevant information, engineering knowledge and skills are identified for solving the problem. Literature review (page 1-3).
Working principle of IR sensors (page 4-5).
Physics behind infrared radiation (page 5-6)
4. Solutions are assessed in terms of strengths and weaknesses. Problem description of the project (page 1).
Design alternative solutions (page 11).
Principle of operation (page 3).
5. Solutions are prioritised and a feasible solution is selected.
Design alternative solutions (page 11).
Table 1b: ELO2 - Application of scientific and engineering knowledge: Apply knowledge of mathematics, natural sciences, engineering fundamentals and an
engineering speciality to solve complex engineering problems.
1. An appropriate mix of fundamental principles and laws of mathematics, natural and engineering Working principle of IR sensors (page 4-5).
science is brought to bear on the solution of narrowly-defined engineering problems. Physics behind infrared radiation (page 5-6)
Design calculations and IR sensor circuit
(page 6-7)
Software design of the system (page 8)
Principle of operation (page 3).
2. Appropriate engineering materials, components or processes are selected with reasoning. LCD display (page 8).
Buzzer(page 10).
3. The boundaries of the practice area are identified and work is performed therein. Physics behind infrared radiation (page 5-6)
Working principle of IR sensors (page 3-4)
Software design of the system (page 8)
Sensitivity of IR sensor
Table 1c: ELO3 - Engineering design: Perform creative, procedural and non-procedural design and synthesis of components, systems, engineering works,
products or processes.
2. The design process is recognises and deals with constraints. Design specification (page 1)
IR sensors simulation result (page 12-14)
Non-contact Tachometer simulation result
(page 15-18)
Software design of the system (page 7-8)
3. Necessary knowledge, information and resources are acquired to provide a solution. Literature review (page 1-3).
Working principle of IR sensors (page 3-4)
Sensitivity of IR sensor(page)
Physics behind infrared radiation (page 5-6)
Design calculations and IR sensor circuit (page 6-
7)
Design calculations and IR sensor circuit (page 6-
4. Design tasks are performed that include component testing to relevant premises, assumptions 7)
and constraints. Sensitivity of IR sensors (page 9)
Non-contact Tachometer simulation
result(page15-18)
IR sensors simulation result (page 14-16)
i|Page
List of figures
Figure 1: IR transmitter...................................................................................................................4
Figure 2: IR Receive........................................................................................................................4
Figure 3: Working principle of IR sensor........................................................................................5
Figure 4: Electromagnetic spectrum [8]..........................................................................................5
Figure 5 : Circuit of IR sensor.........................................................................................................6
Figure 6 : Example of square wave signal from IR sensor to microcontroller................................8
Figure 7 : Software design block diagram.......................................................................................8
Figure 8: Further block diagram of the software design..................................................................9
Figure 9 : LCD pin out diagram....................................................................................................10
Figure 10 : Relationship between resistance and voltage on IR transmitter.................................11
Figure 11: Relationship between distance and resistance. [7].......................................................11
Figure 12: Buzzer circuit diagram.................................................................................................12
Figure 13: Circuit diagram of Hall Effect[3].................................................................................12
Figure 14: Simulation model of the IR sensor...............................................................................13
Figure 15 : Square wave at 30 Hz..................................................................................................14
Figure 16 : Square wave at 40 H...................................................................................................14
Figure 17: Square wave at 50Hz....................................................................................................15
Figure 18: Square wave at 60 Hz...................................................................................................15
Figure 19: Simulation model of Non-Contact Tachometer...........................................................16
Figure 20: Result when speed measured is less than 600 rpm......................................................17
Figure 21: Result when speed measured is great that 3600 rpm...................................................17
Figure 22: Speed at frequency of 10 Hz........................................................................................18
Figure 23: Speed measured at the frequency of 30 Hz..................................................................19
Figure 24 : Speed measured at the frequency of 60 Hz.................................................................19
Figure 25 : IR sensor circuit..........................................................................................................21
Figure 26: controller circuit...........................................................................................................22
Figure 27: Display circuit..............................................................................................................23
Figure 28 : Buzzer and LED circuit...............................................................................................24
Figure 29: 12V DC motor..............................................................................................................25
Figure 30: 5V rechargeable battery...............................................................................................25
Figure 31: Alternative power supply.............................................................................................26
Figure 32: IR sensor circuit practical test setup.............................................................................27
Figure 33: IR sensor output signal when measures motor speed running at 0.22V......................28
Figure 34 : IR sensor output signal when measures motor speed running at 2.1 V......................28
Figure 35: IR sensor output signal when measures motor speed running at 3.34 V.....................29
Figure 36: IR sensor output signal when measures motor speed running at 5V...........................29
Figure 37: Non tachometer practical test setup.............................................................................30
Figure 38: When the speed measured is less than 600 rpm...........................................................31
Figure 39: When the speed measured is greater than 3600 rpm....................................................31
Figure 40: When the speed measured is 754 rpm..........................................................................32
ii | P a g e
Figure 41: When the speed measured is 1225 rpm........................................................................32
Figure 42: When the speed measured is 1542 rpm.......................................................................33
Figure 43: When the speed measured is 1810 rpm........................................................................33
Figure 44 : When the speed measured is 2040 rpm.......................................................................34
Figure 45: When the speed measured is 2908 rpm........................................................................34
Figure 46: Sensitivity of IR sensor investigation set up................................................................35
Figure 47: Results when the distance between the pairs is 0 cm...................................................36
Figure 48: Results when the distance between the pairs is 0.5 cm................................................36
Figure 49: Results when the distance between the pairs is 1.5 cm................................................37
Figure 50: Results when the distance between the pairs is 2.5 cm................................................37
Figure 51: Results when the distance between the pairs is 4 cm...................................................38
Figure 52: Current price of non-contact tachometer in a market...................................................42
List of tables
Table 1 : List of components...........................................................................................................3
Table 2: Relationship between frequency of the square wave and the speed measured and
displayed........................................................................................................................................20
Table 3: Results from sensitivity of IR sensors practical test........................................................38
Table 4: Results of comparison of rotational speed measured using UT372 non-contact
tachometer and the designed non-contact tachometer...................................................................39
iii | P a g e
List of Abbreviation
Abbreviation Meaning
V Volts
I Current
A Amperes
R Resistance
Ω Ohms
P Power
W Watts
LED Light Emitting Diode
LCD Liquid Crystal Display
RPM Revolution Per Minutes
RPS Revolution Per Second
IR sensor Infrared sensor
T Temperature
λ Wavelength
F Frequency
Hz Hertz
Op Amp Operational Amplifier
RF Radio Frequency
GSM Global Standards for Mobile Communication
Content
1. Introduction.........................................................................................................................................1
iv | P a g e
Problem description of the project..........................................................................................................1
Design specifications...............................................................................................................................1
Literature review.....................................................................................................................................1
2. Design system description...................................................................................................................3
Principle of operation..............................................................................................................................3
Working principle of Infrared sensors (IR sensor)..................................................................................4
Physics behind Infrared radiation...........................................................................................................5
Design calculations and IR sensor circuit...............................................................................................6
Software design of the system..................................................................................................................7
LCD display module..............................................................................................................................10
Sensitivity of IR sensor..........................................................................................................................10
Buzzer....................................................................................................................................................12
Design alternative solutions..................................................................................................................12
3. Simulation result................................................................................................................................13
IR sensors result....................................................................................................................................13
Non-contact Tachometer result.............................................................................................................16
4. Analysis of simulation results............................................................................................................20
1. IR sensors......................................................................................................................................20
Non-contact tachometer........................................................................................................................20
5. Practical design procedure.................................................................................................................21
IR sensor circuit....................................................................................................................................21
Controller circuit...................................................................................................................................22
Display unit...........................................................................................................................................23
System testing equipment.......................................................................................................................24
Power supply of the system....................................................................................................................25
6. IR sensor circuit practical results.......................................................................................................27
7. Non-contact Tachometer Practical results.........................................................................................30
8. Sensitivity of IR sensor practical tests...............................................................................................35
9. Analysis of Practical results...............................................................................................................39
IR sensors circuit practical results........................................................................................................39
Non-contact tachometer practical results..............................................................................................39
Sensitivity of IR sensor practical tests...................................................................................................40
10. Project management.......................................................................................................................40
v|Page
Budget plan...........................................................................................................................................40
Breakeven analysis................................................................................................................................41
11. Conclusion.....................................................................................................................................43
12. References.....................................................................................................................................43
13. Acknowledgment...........................................................................................................................44
14. Appendix.......................................................................................................................................44
vi | P a g e
1. Introduction
Tachometer is the measuring instrument used to measure rotating speed in a form of rotating
shaft in a machine usually like motor. The first mechanical Tachometer was designed using the
method of measuring the centrifugal force. The method of measuring the centrifugal force was
adapted for the measurement of speed of the machines, around the year 1817. The tachometers
are mostly used in controlling and monitoring the speed of motor, turbines, conveyors, etc. [1]
There are two main types of tachometer, namely contact and non-contact tachometer. Contact
tachometer is the tachometer that is physically attached to a rotational speed object being
measured, usually object like shaft of the electrical motor. Non-contact tachometer is the type of
tachometer that measures the speed of a rotational object without physically touching an object,
this is done using sensors like infrared sensors or hall effect sensor.
Design specifications
I am required to design and implement the non-contact tachometer. This tachometer measures
the rotational speed between 600 rpm ¿3600 rpm.The rotational speed will be measured using
Infrared sensors (IR sensors). Since It is a non-contact tachometer, the working distance between
the tachometer and the object must be between 5 mm ¿ 100 mm. Atmega16 microcontroller and C
language are used as a software design of the system. The speed measured must be displayed on
the 16 ×2 LCD module.
Literature review
This section covers the feasibility study of historical related project.
Nitin Singh, Raghuvir S. Toma worked on “Design of a Low-Cost Contact-Less Digital
Tachometer with Added Wireless Feature”
This paper proposes a hardware design of an “Digital Contact-less Tachometer” based on
IR sensor for measuring the Revolutions Per Minute of a rotating object. Contact
tachometers require physical contact with the rotating object, and this method affect the
accuracy of the tachometer. This Tachometer design is considered as non-contact
tachometer because it allows the measurement of the speed without physical contact with
the rotating object. To ensure stability and accuracy, a new method is also discussed in
this report, and it allows the results to be displayed every second. This method is also
able to send RF signals which ensures that the measured values to a distant place is sent
1|Page
for its further processing. The radio frequency feature makes it easier for the data logging
for monitoring and controlling the variable values of the RPM. The circuit design is
simple, cheap and provide reliable results. Its stability and reliability have been proven
through practical testing. [3]
J. Kathirvelan, Babu Varghese, Ubaid A Ponnary, Fajas Kamar and Renju Thomas Jacob worked
on Hall Effect Sensor Based Portable Tachometer for RPM Measurement
The research report discusses the design and implementation of the portable tachometer
using the hall effect sensor. The major priority was given for making a portable device,
and be a non-contact tachometer. The prototype gives a similarity with normal tach
generator which is contactable and a rotating shaft inside. A shaft which is supported and
2|Page
rotating over two bearings takes the speed in to the device. The hall element is positioned
stationary over the circuit board and the magnets are closely faced to the sensor. The
sensor used is a digital Hall Effect sensor which gives square pulses. [4]
8. Atmega16/32
microcontroller
3|Page
Working principle of Infrared sensors (IR sensor)
Infrared sensor is an electronic instrument used to sense a certain characteristic at their
surroundings. Infrared sensor is made up of IR transmitter and IR receiver. IR transmitter emits
infrared rays. After the infrared rays get reflected by an obstacle interferes like an object, IR
receiver receives the reflected rays.
Figure 1: IR transmitter
Figure 2: IR Receive
When the IR transmitter emits the infrared rays, it travels in the direction where it is angled.
When an object is placed in front of IR pairs, the IR rays is reflected by an object and it produces
secondary wavelets which travels in an opposite direction opposite to that of the primary waves,
which produces the reflection of infrared rays. [7]
IR receiver absorbs the reflected infrared rays, IR receiver is a two terminal PN junction device,
which operates in a reverse bias. It has a tiny transparent window, which allows light to strike the
PN junction. A photodiode is a type of photodetector capable of converting light into current or
voltage. Most photodiodes will look similar to a light emitting diode. They will have two leads,
or wires. The shorter lead of the two is the cathode/negative, while the longer lead is the
anode/positive. [7]
A photodiode consists of PN junction. When a photon of sufficient energy strikes the diode, it
excites an electron thereby creating a mobile electron and a positively charged electron hole. If
the absorption occurs in the junction's depletion region, or one diffusion length away from it,
these carriers are swept from the junction by the built-in field of the depletion region. Thus, holes
move toward the anode, and electrons toward the cathode, and a photocurrent is produced. [7]
4|Page
Figure 3: Working principle of IR sensor
IR sensors working in different regions of the infrared radiation spectrum but the physics
behind IR sensors is governed by three laws
1. Planck’s radiation law
Every object at a temperature T not equal to 0 K emits radiation. Infrared radiant energy is
determined by the temperature and surface condition of an object. Human eyes cannot detect
differences in infrared energy because they are primarily sensitive to visible light energy from
400 ¿ 700 nm. Our eyes are not sensitive to the infrared energy.
5|Page
2. Stephan Boltzmann Law
The total energy emitted at all wavelengths by a black body is related to the absolute temperature
as
W b =σ ×T 4 … … …(1)
Where: -
W b =total energy emitted
6|Page
Figure 5 : Circuit of IR sensor
When an object is placed in front of IR pairs and 5 V power supply applied on the circuit, the IR
transmitter emits the infrared radiation directed to the object. The infrared radiation gets reflected
by an object and travels to the opposite direction. The IR receiver absorbs the reflected infrared
radiation. This result to drop in voltage across the IR receiver, or photodiode. Then there is an
increase in voltage across resistor R2. The voltage comparator compares the voltage at the
inverting input and non-inverting input. When voltage at non inverting input is higher than the
voltage at inverting input, then the output becomes high and LED (x4 LED) turns ON. When
there is no object place in front of IR pairs, then there is no infrared radiation absorbed by the IR
receiver or photodiode. This result to voltage comparator output being logic zero or low.
IR transmitter operates like a normal LED, it consumes 20 mA current and 3 volts power.
Therefore: -
V 1=R1 × I … … …(4)
V 1 +V LED=Vcc … … …(5)
V1
Therefore R1= … … …(6)
I
For IR transmitter protection R1 must be greater than 100 Ω. Therefore R1=150 Ω
The power consumed by an LED can computed as follows
P=V LED × I … … … …(7)
IR receiver converts the reflected rays into current. Therefore resistor R2 translate current into
voltage. Resistor R2 must be high. Resistor R4 is also chosen to be 330 Ω for protection of LED
(x4 LED).
7|Page
Software design of the system
In the software of the design of the system, Atmega16 as microcontroller and C as the
programing language is used. The microcontroller receives signal from IR sensors, and process
it, where the speed rotational speed in revolution per minute is computed. The speed is displayed
on 16 ×2 LCD module. The code used in the software design is on figure 2 in Appendix.
The microcontroller receives the signal from the IR sensor circuit in a form of a square wave.
The microcontroller atmega16 is programmed such that every time the input in the interrupt pin
(pin 16) is toggling, the interrupt is initiated. In the microcontroller, the timer triggers the
interrupt(INT0). The interrupt is responsible to counts the number of falling edges of the square
wave and sends the value to the LCD display every second. Another timer resets the counter
after each second. Therefore, we get the number of rotations per second of the motor shaft and
convert them to revolutions per minute RPM =RPS × 60.
8|Page
Figure 7 : Software design block diagram
9|Page
Figure 8: Further block diagram of the software design
10 | P a g e
LCD display module
Liquid Crystal Display (LCD) screen is an electronic display module. A 16x2 LCD display is
very basic module and is very commonly used in various devices and circuits. In this system is
also used for same function, which is to display the speed measured.
Sensitivity of IR sensor
This section discusses the analysis the sensitivity of IR sensor. The sensitivity of sensors refers to
the degree of effectiveness of functioning of sensors. The sensitivity of IR sensor is an important
factor in the design. In IR sensor circuit, the sensitivity of IR sensors is adjusted using
potentiometer. Turning up the potentiometer increases the sensitivity of the IR sensors.
The sensitivity of the IR sensor is influenced by the output voltage in IR transmitter. The
output voltage in the transmitter depends on the resistance in the IR transmitter and the
amount of infrared rays reflected from the object (rotational object).
This is a relationship between resistance and output voltage in infrared transmitter. the study
shows that the resistance is inversely proportional to the voltage in the infrared transmitter.
11 | P a g e
Figure 10 : Relationship between resistance and voltage on IR transmitter.
The relationship between the distance be the Infrared radiation pairs and the resistance. The
distance between the infrared pairs influences the sensitivity of IR sensors. The resistance used at
the sensor influences the intensity of the infrared radiation emitted by infrared transmitter. The
study shows that the resistance applied is inversely proportional to the distance of IR Receiver
capable to detect IR ray emitted from IR Transmitter due to lower light intensity of IR
Transmitter. [7]
The distance between IR transmitter and IR receiver influences the sensitivity of the IR
sensor. The short the distance between IR transmitter and IR receiver result to higher
sensitivity of IR sensors, hence the longer distance of the object can be sensed. [8]
The colour of the object also influences the sensitivity of the IR sensor. The white object
reflects more IR rays than a black or darker object. Hence white or lighter object result to
higher sensitivity of IR sensors.
12 | P a g e
Buzzer
A buzzer is a sound producing electronic component, which may be mechanical,
electromechanical, or piezoelectric. Buzzer is powered by a DC power source, and it is made up
of electronic transducers in structure. Buzzer is mostly used in computers, telephones, alarms,
electronic toys, automotive electronic equipment, other electronic products for sound devices. In
this design, the buzzer is used to make this non-contact tachometer more user friendly. When the
speed measured is less than 600 rpm or greater than 3600 rpm, the buzzer will be stimulated.
13 | P a g e
The measurement of rotational speed can be done contact tachometer. This is done by
physical contact of tachometer with a rotational object. However, this design method is
evaluated to have inaccurate reading of a speed and reducing the rotational speed.
There are also many solutions in software design of non-contact tachometer. This
tachometer can also be designed using the solution of Arduino Uno. The equipment for
Arduino Uno is expensive compared to Atmega16/30 microcontroller.
3. Simulation result
IR sensors result
This is the simulation of IR sensor circuit using multisim-simulating tool. The IR sensor circuit
consist of resistors, IR transmitter, IR receive, potentiometer, LED and operational amplifier
LM358AD.
The results of IR sensor are the square wave at a certain frequency. The frequency corresponds
to the rotational speed measured. The following results shows the rotational speed measured at a
frequency of 30 Hz, 40 Hz, 50 Hz and 60 Hz.
14 | P a g e
Rotational speed at frequency of 30Hz
15 | P a g e
Rotational speed at frequency of 50Hz
16 | P a g e
Non-contact Tachometer result
This section covers the simulation result of the non-tachometer system, simulated using Proteus
simulating tool. The simulation consists of two LED, clock with variable frequency,
microcontroller Atmega16/30 and LCD module. Clock represent the output signal from the IR
sensor.
This non-contact tachometer is design to measure the rotational speed between
600 rpm ¿3600 rpm, therefore to make this tachometer be user friendly, the system is further
designed to indicate when the speed is below or above the range. When the speed is less than
600 rpm, the LED D2 light up and the message “Speed below minimum” is displayed on LCD.
When the speed is above the 3600 rpm, LED D1 light up and the message “Speed above
maximum” is displayed on LCD.
17 | P a g e
When the speed measured is less than 600 rpm, the results are shown in figure 19.
Figure 20: Result when speed measured is less than 600 rpm
When the speed measured is great than 3600 rpm, the results are shown in figure 20.
Figure 21: Result when speed measured is great that 3600 rpm
18 | P a g e
The system is designed such that the clock with a variable frequency represent the output signal
from IR sensor, so the frequency represents the speed in revolution per minutes. The
microcontroller receives the signal and process it. In the microcontroller the method of counter
and timers is used to process the signal into the speed in revolution per seconds, the
microcontroller further computes the speed into revolution per minute RPM =RPS × 60
When speed measured is 600 rpm. This minimum speed, this tachometer can measure. shown in
figure 21.
19 | P a g e
When speed measured is 1800 rpm. Results shown in figure 22.
20 | P a g e
When speed measured is 3600 rpm. This maximum speed, this tachometer can measure. Results
shown in figure 21.
Non-contact tachometer
This non-contact tachometer is design to measure the rotational speed between
600 rpm ¿3600 rpm. When the speed is less than 600 rpm, the LED D2 light up and the message
“Speed below minimum” is displayed on LCD. When the speed is above the 3600 rpm, LED D1
light up and the message “Speed above maximum” is displayed on LCD. The clock with a
21 | P a g e
variable frequency represents the output signal from IR sensor. The frequency is directly
proportional to both revolutions per minute and revolutions per seconds.
Table 2: Relationship between frequency of the square wave and the speed measured and displayed.
The frequency of the square from IR sensor Rotational speed measured and displayed on
circuit (Hz) the LCD display (RPM)
10 600
20 1200
30 1800
40 2400
50 3000
60 3600
IR sensor circuit
IR transmitter (blue LED) emits infrared radiation.
IR receiver (white LED) absorbs the reflected infrared radiation.
Normal LED (green LED) turns ON when the object is sensed.
Potentiometer controls the sensitivity of the sensors.
Resistors acts as a protection for LED.
22 | P a g e
Operational amplifier acts voltage comparator
Controller circuit
This circuit contains Atmega16 controller programmed using C programming language.
Microcontroller receives the signal from IR sensor circuit. The signal is processed and sent to the
display unit.
23 | P a g e
Figure 26: controller circuit
Display unit
The 2 ×16 LCD display receives the information from the microcontroller and displays it.
24 | P a g e
Figure 27: Display circuit
There are additional subsystems for indication when the speed measures the rotational speed
below the minimum of 600 rpm and above maximum of 3600 rpm. The aim of these subsystems
is to make the design more user friendly and less complicated. These subsystems are made up of
circuit for buzzer and LED. The 5v buzzer turns ON and the LED flashes each time the
tachometer measures the speed outside the boundaries of a design specification, which is
between 600 rpm and 3600 rpm.
25 | P a g e
Figure 28 : Buzzer and LED circuit
26 | P a g e
Figure 29: 12V DC motor
27 | P a g e
The other power supply alternative when the rechargeable battery is discharged, the power
supply of 5 V using rectification design where the AC power from the mains is converted to a
stable DC voltage.
28 | P a g e
6. IR sensor circuit practical results
The section discusses the practical result of IR sensor circuit using the 12 V DC motor as the
testing equipment. The output signal of IR sensor circuit is square wave. The results are recorded
from the digital oscilloscope. The speed of the electrical motor is changed through the input
voltage, and the behavior of the square wave is observed and recorded. The square wave is
recorded at 0.92 V , 2.1 V , 3.34 V and 5 V . White paper was attached on the shaft of the motor.
29 | P a g e
The output of IR sensor circuit when the electrical motor is running at the input voltage of 0.22 V
Figure 33: IR sensor output signal when measures motor speed running at 0.22V
The output of IR sensor circuit when the electrical motor is running at the input voltage of 2.1 V
Figure 34 : IR sensor output signal when measures motor speed running at 2.1 V
30 | P a g e
The output of IR sensor circuit when the electrical motor is running at the input voltage of 3.34 V
Figure 35: IR sensor output signal when measures motor speed running at 3.34 V
The output of IR sensor circuit when the electrical motor is running at the input voltage of 5 V
Figure 36: IR sensor output signal when measures motor speed running at 5V
31 | P a g e
7. Non-contact Tachometer Practical results
This section covers the practical results of non-contact tachometer. This practical test setup
consist of non-contact tachometer designed, UT372 non-contact tachometer, 12 V DC motor,5 V
rechargeable battery to supply the system, and 30 V variable power supply to power the motor. In
this test, the rotational speed of a DC motor is measured using the designed non-contact
tachometer, and the speed measured using UT372 non-contact tachometer are compared.
This non-tachometer is designed to measure the rotational speed of a motor between 600 rpm and
3600 rpm and displays it on a 2 ×16 LCD display. When the measured speed is less than 600 rpm
, the system displays “Speed below minimum” and when the speed measured is greater than
3600 rpm, the system displays “Speed above maximum”. The UT372 non-contact tachometer
measures the rotational speed from 10 rpm to 99999 rpm.
32 | P a g e
When the speed measured is less than 600 rpm, the results are shown in figure 38 below.
Figure 38: When the speed measured is less than 600 rpm
When the speed measured is greater than 3 600 rpm, the results are shown in figure 39 below.
Figure 39: When the speed measured is greater than 3600 rpm
33 | P a g e
When speed measured by UT372 is 754 rpm. The designed tachometer measures 720 rpm. the
results are shown on figure 40 below.
When speed measured by UT372 is 1225 rpm. The designed tachometer measures 1020 rpm. the
results are shown on figure 41 below.
34 | P a g e
When speed measured by UT372 is 1542 rpm. The designed tachometer measures 1560 rpm. the
results are shown on figure 42 below.
When speed measured by UT372 is 1810 rpm. The designed tachometer measures 1800 rpm. the
results are shown on figure 43 below.
35 | P a g e
When speed measured by UT372 is 2040 rpm. The designed tachometer measures 2040 rpm. the
results are shown on figure 44 below.
When speed measured by UT372 is 2908 rpm. The designed tachometer measures 2880 rpm. the
results are shown on figure 45 below.
36 | P a g e
8. Sensitivity of IR sensor practical tests
This section discusses the practical investigation of the sensitivity of IR sensor. The investigation
is about the relationship between the distance between the IR pairs and the maximum distance
between the IR sensors and the object being sensed. The investigation set up consists of IR
sensor circuit connected on the breadboard, ruler to measure the distances, 5v rechargeable
battery to power up the IR sensor circuit and white paper used as boundary object. The test was
done by setting up the distance between the IR pairs and measure the maximum distance
between the IR sensors and the object being sensed. The yellow LED light up to show that the
object is sensed. The test was conducted at room temperature environment.
37 | P a g e
When the distance between the IR pairs is 0 cm, the maximum distance between the IR sensors
and the object being sensed is 12.1 cm. The result is shown in figure 37 below.
When the distance between the IR pairs is 0.5 cm, the maximum distance between the IR sensors
and the object being sensed is 11.5 cm. The results are shown in figure 38 below.
Figure 48: Results when the distance between the pairs is 0.5 cm
38 | P a g e
When the distance between the IR pairs is 1.5 cm, the maximum distance between the IR sensors
and the object being sensed is 10.2 cm. The results are shown in figure 39 below.
Figure 49: Results when the distance between the pairs is 1.5 cm
When the distance between the IR pairs is 2.5 cm, the maximum distance between the IR sensors
and the object being sensed is 8.3 cm. The results are shown in figure 40 below.
Figure 50: Results when the distance between the pairs is 2.5 cm
39 | P a g e
When the distance between the IR pairs is 4 cm, the maximum distance between the IR sensors
and the object being sensed is 5.4 cm. The results are shown in figure 41 below.
0.5 11.5
1.5 10.2
2.5 8.3
4 5.4
40 | P a g e
9. Analysis of Practical results
This section covers the analysis and discussion of the practical of the IR sensors circuit, non-
contact tachometer and sensitivity of IR sensors.
Table 4: Results of comparison of rotational speed measured using UT372 non-contact tachometer and
the designed non-contact tachometer
Speed measured using UT372 non-contact Speed measured using the design non-contact
tachometer (RPM) tachometer (RPM)
52 “Speed below minimum”
754 720
1225 1020
1542 1560
1810 1800
2040 2040
2908 2880
5689 “Speed above maximum”
41 | P a g e
Sensitivity of IR sensor practical tests
The test was done by setting up the distance between the IR pairs and measure the maximum
distance between the IR sensors and the object being sensed. As the distance between the IR
pairs increases, the maximum distance between the IR sensors and the object being sensed
decreases. In conclusion, the higher sensitivity of the IR sensors is achieved by setting the IR
pairs so close to each other, at the distance of zero.
Budget plan
Labour Costs
Time (hour) Cost per hour Cost (Rands)
(Rands)
Design and 3 100 300
calculation of the
Tachometer
Design simulation 5 100 500
Microcontroller 4 50 250
Coding
Prototype Building 6 150 600
42 | P a g e
Jumper wires 35.40 1 35.40
Dc motor (for testing) 215.46 1 215.46
Breakeven analysis
In the breakeven analysis, it was discovered that this non-contact tachometer could be able to
compete in the market and make a good profit, given that the design process costs are followed
as they are discussed in the budget plan. The estimated profit is R 50 640 per 100 sales.
11. Conclusion
Under the specification given, feasibility study discussed, design calculation performed, system
analyzed, simulation performed, and simulation result recorded. The non-contact tachometer
using infrared sensor (IR sensors) can be design and operate as expected in practical conditions.
The challenge in the design process of non-contact tachometer is that the system does not have
44 | P a g e
much mathematical description because of the nature of the project. In simulation result analysis,
the frequency is equivalent to the total number of falling edges in the square wave in second. At
higher frequency, the output square wave is narrower and at lower frequency, the output wave is
wider in width. The sensitivity of the IR sensors is influenced by the colour of the object and the
distance between the IR pairs. The comparison of UTS372 non-contact tachometer and the
designed tachometer is slightly the same for measuring the rotational speed in RPM. Practically
the distance between the IR pairs is inversely proportional to the sensitivity of IR sensors. In a
market, this tachometer has a potential of generating an estimated profit is R 50 640 per 100
sales, given the design process is followed as in this report paper.
12. References
1. D. Tisaj, "Design and Construction of a Tachometer," Murdoch University , Perth,
Western Australia , 2014.
2. P. Salice, N. Naveen. (2014). Design of a Contactless tachometer. International Journal
of Advanced Research in Electrical, Electronics and Instrumentation Engineering
(IJAREIE), 7663 – 7665
4. J. Kathirvelan, "Hall Effect Sensor Based Portable Tachometer for RPM Measurement,"
International Journal of Computer Science and Engineering Communications-, vol.2, no.
1 February 2014, pp. 100-105, 2014
6. P. Mishra, S. Pradhan, Contactless Tachometer with Auto Cut Off. (2017). International
Research Journal of Engineering and Technology (IRJET), 369 - 371.
45 | P a g e
13. Acknowledgment
I would like to express my special thanks of gratitude to my project supervisor Dr R. Tiako for
guidance and encouragement throughout the course of the project and my external examiner Mr
J. McKelvin for positive criticism and encouraging comment, Dr A. Saha as well as our project
course coordinate who gave me the golden opportunity to do this wonderful project on the topic,
Design and Implementation of Non-Contact Tachometer for Speed Measurement of Electrical
Motor, which also helped me in doing a lot of Research, and I came to know about so many new
things I am really thankful to them. Secondly I would also like to thank my parents and friends
who helped me a lot in finalizing this project within the limited time frame.
14. Appendix
The Gantt chart discusses the time planning of the project.
Gantt Chart
31-Dec-17 10-Apr-18 19-Jul-18 27-Oct-18 4-Feb-19
Oral presentation 0
Date
Figure 2: Code from software design. Microcontroller Atmega16 simulated using Proteus
simulating tool.
#include <inttypes.h>
46 | P a g e
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <util/delay.h>
#define F_CPU 1000000UL
#define LCD_DATA_PORT PORT(LCD_DATA)
#define LCD_E_PORT PORT(LCD_E)
#define LCD_RS_PORT PORT(LCD_RS)
#define LCD_RW_PORT PORT(LCD_RW)
#define LCD_DATA_DDR DDR(LCD_DATA)
#define LCD_E_DDR DDR(LCD_E)
#define LCD_RS_DDR DDR(LCD_RS)
#define LCD_RW_DDR DDR(LCD_RW)
#define LCD_DATA_PIN PIN(LCD_DATA)
#define SET_E() (LCD_E_PORT|=(1<<LCD_E_POS))
#define SET_RS() (LCD_RS_PORT|=(1<<LCD_RS_POS))
#define SET_RW() (LCD_RW_PORT|=(1<<LCD_RW_POS))
#define CLEAR_E() (LCD_E_PORT&=(~(1<<LCD_E_POS)))
#define CLEAR_RS() (LCD_RS_PORT&=(~(1<<LCD_RS_POS)))
#define CLEAR_RW() (LCD_RW_PORT&=(~(1<<LCD_RW_POS)))
#ifndef _LCD_H
#define _LCD_H
#define LCD_DATA D //Port PD3-PD6 are connected to D4-D7
#define LCD_E D //Enable/strobe signal
#define LCD_E_POS PD7 //Position of enable in above port
#define LCD_RS B
#define LCD_RS_POS PB2
#define LCD_RW B
#define LCD_RW_POS PB0
#define LCD_DATA_POS 3
47 | P a g e
/***********************************************
LCD Type Selection
Uncomment Just one of them
************************************************/
//#define LCD_TYPE_202 //For 20 Chars by 2 lines
#define LCD_TYPE_204 //For 20 Chars by 4 lines
//#define LCD_TYPE_162 //For 16 Chars by 2 lines
//#define LCD_TYPE_164 //For 16 Chars by 4 lines
//************************************************
#define LS_BLINK 0B00000001
#define LS_ULINE 0B00000010
#define LS_NONE 0B00000000
/***************************************************
FUNCTIONS END
****************************************************/
/***************************************************
MACROS
***************************************************/
#define LCDClear() LCDCmd(0b00000001)
#define LCDHome() LCDCmd(0b00000010);
#define LCDWriteStringXY(x,y,msg) {\
LCDGotoXY(x,y);\
LCDWriteString(msg);\
}
#define LCDWriteIntXY(x,y,val,fl) {\
LCDGotoXY(x,y);\
LCDWriteInt(val,fl);\
}
#endif
#ifndef MYUTILS_H
48 | P a g e
#define MYUTILS_H
#define _CONCAT(a,b) a##b
#define PORT(x) _CONCAT(PORT,x)
#define PIN(x) _CONCAT(PIN,x)
#define DDR(x) _CONCAT(DDR,x)
#endif
#define LCDCmd(c) (LCDByte(c,0))
#define LCDData(d) (LCDByte(d,1))
#define MYUTILS_H
#define _CONCAT(a,b) a##b
#define PORT(x) _CONCAT(PORT,x)
#define PIN(x) _CONCAT(PIN,x)
#define DDR(x) _CONCAT(DDR,x)
/***************************************************
FUNCTIONS
****************************************************/
void LCDInit(uint8_t style);
void LCDWriteString(const char *msg);
void LCDWriteInt(int val,unsigned int field_length);
void LCDGotoXY(uint8_t x,uint8_t y);
void LCDByte(uint8_t,uint8_t);
void LCDBusyLoop();
void LCDByte(uint8_t c,uint8_t isdata)
{
//Sends a byte to the LCD in 4bit mode
//cmd=0 for data
//cmd=1 for command
//NOTE: THIS FUNCTION RETURS ONLY WHEN LCD HAS PROCESSED THE COMMAND
uint8_t hn,ln; //Nibbles
uint8_t temp;
49 | P a g e
hn=c>>4;
ln=(c & 0x0F);
if(isdata==0)
CLEAR_RS();
else
SET_RS();
_delay_us(0.500); //tAS
SET_E();
//Send high nibble
temp=(LCD_DATA_PORT & (~(0X0F<<LCD_DATA_POS)))|((hn<<LCD_DATA_POS));
LCD_DATA_PORT=temp;
_delay_us(1); //tEH
//Now data lines are stable pull E low for transmission
CLEAR_E();
_delay_us(1);
//Send the lower nibble
SET_E();
temp=(LCD_DATA_PORT & (~(0X0F<<LCD_DATA_POS)))|((ln<<LCD_DATA_POS));
LCD_DATA_PORT=temp;
_delay_us(1); //tEH
//SEND
CLEAR_E();
_delay_us(1); //tEL
LCDBusyLoop();
}
void LCDBusyLoop()
{
//This function waits till lcd is BUSY
uint8_t busy,status=0x00,temp;
50 | P a g e
//Change Port to input type because we are reading data
LCD_DATA_DDR&=(~(0x0f<<LCD_DATA_POS));
//change LCD mode
SET_RW(); //Read mode
CLEAR_RS(); //Read status
//Let the RW/RS lines stabilize
_delay_us(0.5); //tAS
do
{
SET_E();
//Wait tDA for data to become available
_delay_us(0.5);
status=(LCD_DATA_PIN>>LCD_DATA_POS);
status=status<<4;
_delay_us(0.5);
//Pull E low
CLEAR_E();
_delay_us(1); //tEL
SET_E();
_delay_us(0.5);
temp=(LCD_DATA_PIN>>LCD_DATA_POS);
temp&=0x0F;
status=status|temp;
busy=status & 0b10000000;
_delay_us(0.5);
CLEAR_E();
_delay_us(1); //tEL
}while(busy);
CLEAR_RW(); //write mode
//Change Port to output
51 | P a g e
LCD_DATA_DDR|=(0x0F<<LCD_DATA_POS);
}
void LCDInit(uint8_t style)
{
/*****************************************************************
52 | P a g e
CLEAR_E();
_delay_us(1);
//Wait for LCD to execute the Functionset Command
LCDBusyLoop(); //[B] Forgot this delay
//Now the LCD is in 4-bit mode
LCDCmd(0b00101000); //function set 4-bit,2 line 5x7 dot format
LCDCmd(0b00001100|style); //Display On
}
void LCDWriteString(const char *msg)
{
/*****************************************************************
This function Writes a given string to lcd at the current cursor
location.
Arguments:
msg: a null terminated string to print
*****************************************************************/
while(*msg!='\0')
{
LCDData(*msg);
msg++;
}
}
void LCDWriteInt(int val,unsigned int field_length)
{
/***************************************************************
This function writes a integer type value to LCD module
Arguments:
1)int val : Value to print
2)unsigned int field_length :total length of field in which the value is printed
must be between 1-5 if it is -1 the field length is no of digits in the val
53 | P a g e
****************************************************************/
char str[7]={0,0,0,0,0,0,0};
int i=6,j=0;
while(val)
{
str[i]=val%10;
val=val/10;
i--;
}
if(field_length==-1)
while(str[j]==0) j++;
else
j=7-field_length;
if(val<0) LCDData('-');
for(i=j;i<7;i++)
{
LCDData(48+str[i]);
}
}
void LCDGotoXY(uint8_t x,uint8_t y)
{
if(x>=20) return;
#ifdef LCD_TYPE_204 OR LCD_TYPE_162 //OR LCD_TYPE_202
switch(y)
{
case 0:
break;
case 1:
x|=0b01000000;
break;
54 | P a g e
case 2:
x+=0x14;
break;
case 3:
x+=0x54;
break;
}
#endif
#ifdef LCD_TYPE_164
switch(y)
{
case 0:
break;
case 1:
x|=0b01000000;
break;
case 2:
x+=0x10;
break;
case 3:
x+=0x50;
break;
}
#endif
x|=0b10000000;
LCDCmd(x);
}
volatile uint16_t count=0; //Main revolution counter
volatile uint16_t rpm=0;//Revolution per minute
volatile uint16_t rps=0; //Revolution per second
55 | P a g e
void Wait()
{
uint8_t i;
for(i=0;i<2;i++)
{
_delay_loop_2(0);
}
}
int main()
{
LCDInit(LS_NONE);
LCDWriteStringXY(0,0,"Tachometer");
LCDWriteStringXY(0,1,"-By Smangaliso-");
Wait();
Wait();
Wait();
Wait();
Wait();
LCDClear();
LCDWriteStringXY(0,0,"Ready To measure");
LCDWriteStringXY(0,1,"****************");
Wait();
Wait();
//Init INT0
MCUCR|=(1<<ISC01); //Falling edge on INT0 triggers interrupt.
GICR|=(1<<INT0); //Enable INT0 interrupt
//Timer1 is used as 1 sec time base
//Timer Clock = 1/1024 of sys clock
//Mode = CTC (Clear Timer On Compare)
TCCR1B|=((1<<WGM12)|(1<<CS12)|(1<<CS10));
56 | P a g e
//Compare value=976
OCR1A=976;
TIMSK|=(1<<OCIE1A); //Output compare 1A interrupt enable
//Enable interrupts globaly
sei();
//LED Port as output
//DDRB|=(1<<PB1);
//DDRB|=(3<<PB3);
LCDClear();
//LCDWriteStringXY(0,0,"Rev/m=");
//LCDWriteStringXY(0,1,"Rev/s=");
Wait();
while(1)
{
if (rps>60){
LCDClear();
DDRB|=(1<<PB1);
PORTB|=(1<<PB1);
LCDWriteStringXY(0,0,"Speed Above");
LCDWriteStringXY(0,1,"maximum");
Wait();
PORTB&=(~(1<<PB1));
}
else if (rps<10){
if (rps >1){
LCDClear();
DDRB|=(3<<PB3);
PORTB|=(1<<PB3);
LCDWriteStringXY(0,0,"Speed below");
LCDWriteStringXY(0,1,"minimum");
57 | P a g e
Wait();
PORTB&=(~(1<<PB3));
}
}
else {
LCDClear();
LCDWriteStringXY(0,0,"Rev/m=");
LCDWriteStringXY(0,1,"Rev/s=");
LCDWriteIntXY(6,0,rpm,7);
LCDWriteIntXY(6,1,rps,7);
}
Wait();
LCDClear();
}
return (0);
}
ISR(INT0_vect)
{
//CPU Jumps here automatically when INT0 pin detect a falling edge
count++;
}
ISR(TIMER1_COMPA_vect)
{
//CPU Jumps here every 1 sec exactly!
rps=count;
rpm=rps*60;
count=0;}
58 | P a g e